aboutsummaryrefslogtreecommitdiffstats
path: root/stop.sh
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-06-20 21:44:58 +0300
committerFilipp Lepalaan <filipp@mac.com>2010-06-20 21:44:58 +0300
commit85406dae0c220759da4b816fa9380c25d72b73ba (patch)
tree0390e68282697fa7873e3bf44f9abff667359079 /stop.sh
downloadoffsync-85406dae0c220759da4b816fa9380c25d72b73ba.tar.gz
offsync-85406dae0c220759da4b816fa9380c25d72b73ba.tar.bz2
offsync-85406dae0c220759da4b816fa9380c25d72b73ba.zip
First commit
Diffstat (limited to 'stop.sh')
-rwxr-xr-xstop.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/stop.sh b/stop.sh
new file mode 100755
index 0000000..56ebb29
--- /dev/null
+++ b/stop.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# offsync/stop.sh
+# interrupts the offsite job in the morning
+
+MYDIR=$(dirname $0)
+source "${MYDIR}/config"
+
+if -z "${PIDFILE}"; then
+ echo "Check your configuration!" 2>&1
+fi
+
+kill $(cat "$PIDFILE") && rm "${PIDFILE}"