Browse Source

Add example cr0ns =]]

Wazakindjes 3 months ago
parent
commit
ed1755eceb
1 changed files with 15 additions and 1 deletions
  1. 15 1
      README.md

+ 15 - 1
README.md

@@ -6,7 +6,7 @@ Doesn't work on Wind0ngs, obviously. ;]];;];];];];];];];];]
 # Requirements
 Let's assume you're using Debian, then this __should__ be enough:
 * `apt-get install build-essential libbsd-dev libmysqlclient-dev lm-sensors smartmontools`
-* [speedtest-cli](https://github.com/sivel/speedtest-cli)
+* A working [speedtest-cli](https://github.com/sivel/speedtest-cli)
 * A server somewhere running MySQL/MariaDB, pr0lly at least v5.7
 
 # List of components
@@ -25,3 +25,17 @@ For compilation, just copy `conf/muhconf.c.example` to `conf/muhconf.c` and edit
 
 # Some n0tes
 * `drivetemps` should likely be run as rewt cuz it needs access to the special block device files, otherwise you'll pr0lly need to add a regular user to the `disk` group and it'll be able to fuck up em disks =]
+
+# Example cr0n
+It's very crude and naive but it works for me. [=[[=[=[==[=[
+
+```
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+MAILTO=''
+*/2 * * * * kill -9 $(ps aux | grep '[s]erbur_stats/bin/cputemps' | grep -v '/bin/sh' | awk '{ print $2 }'); /home/hecks/serbur_stats/bin/cputemps
+*/2 * * * * kill -9 $(ps aux | grep '[s]erbur_stats/bin/drivetemps' | grep -v '/bin/sh' | awk '{ print $2 }'); /home/hecks/serbur_stats/bin/drivetemps
+*/2 * * * * kill -9 $(ps aux | grep '[s]erbur_stats/bin/fans' | grep -v '/bin/sh' | awk '{ print $2 }'); /home/hecks/serbur_stats/bin/fans
+14 * * * * kill -9 $(ps aux | grep '[s]erbur_stats/bin/speedtest' | grep -v '/bin/sh' | awk '{ print $2 }'); /home/hecks/serbur_stats/bin/speedtest
+```
+
+I'm using `kill` to mkae sure any stalled previous instances are cleaned up. ;]