aboutsummaryrefslogtreecommitdiffstats
path: root/stop.sh
diff options
context:
space:
mode:
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}"