summaryrefslogtreecommitdiffstats
path: root/network/syncthing/rc.syncthing
diff options
context:
space:
mode:
author Lionel Young2015-03-29 09:29:14 +0200
committer Willy Sudiarto Raharjo2015-03-29 09:29:14 +0200
commit789875939813686a7dfec058a28a7f538100d012 (patch)
treef2fc2755143b16e099110b5a2ad110308beca8d5 /network/syncthing/rc.syncthing
parent943ae3adc9bb545eb142584389ca050be6f9253f (diff)
downloadslackbuilds-789875939813686a7dfec058a28a7f538100d012.tar.gz
network/syncthing: Added (sync files between your own devices).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/syncthing/rc.syncthing')
-rw-r--r--network/syncthing/rc.syncthing29
1 files changed, 29 insertions, 0 deletions
diff --git a/network/syncthing/rc.syncthing b/network/syncthing/rc.syncthing
new file mode 100644
index 0000000000..9e13fac946
--- /dev/null
+++ b/network/syncthing/rc.syncthing
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# syncthing start script
+
+case "$1" in
+ stop)
+ PID=/var/run/syncthing/syncthing.pid
+ if [ -f $PID ]; then
+ echo "Stop Syncthing..."
+ kill "`cat /var/run/syncthing/syncthing.pid`"
+ else
+ echo "Syncthing is not running..."
+ exit 1
+ fi
+ ;;
+ start)
+ echo "Start Syncthing..."
+ /usr/bin/syncthing
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 { start | stop | restart }" >&2
+ exit 1
+ ;;
+esac