X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/694d91f3ec3f4e73a9c176fffb21d3d42e9db5ee..52c80cff91dce5fa14ae903c6c2bf20533ccca46:/croncheck.sh diff --git a/croncheck.sh b/croncheck.sh index 4058c16..e737aa5 100755 --- a/croncheck.sh +++ b/croncheck.sh @@ -1,8 +1,12 @@ #!/bin/bash -cd /home/jrunyon/erebus +cd "$(dirname $(readlink -f $0))" exec &>nohup.out +if [ -e dontstart ]; then + exit 0 +fi + if ! kill -0 "$(cat pidfile)"; then - nohup ./run.sh & + nohup ./run & fi