]> jfr.im git - erebus.git/commitdiff
add cron checker
authorzonidjan <redacted>
Mon, 12 Sep 2016 11:49:33 +0000 (06:49 -0500)
committerzonidjan <redacted>
Mon, 12 Sep 2016 11:49:33 +0000 (06:49 -0500)
croncheck.sh [new file with mode: 0755]
run.sh

diff --git a/croncheck.sh b/croncheck.sh
new file mode 100755 (executable)
index 0000000..165b746
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+exec &>/dev/null
+
+cd /home/jrunyon/erebus
+
+if ! kill -0 "$(cat pidfile)"; then
+       nohup ./run.sh >nohup.out &
+fi
diff --git a/run.sh b/run.sh
index 9f473de7cf0ae4a86854493b41ea1f4d7988b021..34eac2824d822475a2952ad7d0674518f2b7c8f4 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -4,4 +4,4 @@
 # Startup script
 
 cd "$(dirname $(readlink -f $0))"
-PYTHONPATH=".:$PYTHONPATH" python -O -B "$@" erebus.py
+PYTHONPATH=".:$PYTHONPATH" exec python -O -B "$@" erebus.py