diff options
author | Philip van der Hoeven <philip@vd-hoeven.nl> | 2014-12-30 00:01:00 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-12-30 00:01:00 +0700 |
commit | 823f42a58c48e4837b83a59e92c58f17c13fce94 (patch) | |
tree | bb3dbf53896f48f1a8682a47b83cdac5d80abdc6 /network/btsync/rc.btsync | |
parent | 985af3acb80d914be0570c038242bf32d0235b6b (diff) | |
download | slackbuilds-823f42a58c48e4837b83a59e92c58f17c13fce94.tar.gz |
network/btsync: Added (sync files).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/btsync/rc.btsync')
-rw-r--r-- | network/btsync/rc.btsync | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/network/btsync/rc.btsync b/network/btsync/rc.btsync new file mode 100644 index 0000000000..71bf757e16 --- /dev/null +++ b/network/btsync/rc.btsync @@ -0,0 +1,29 @@ +#!/bin/sh +# +# btsync start script + +case "$1" in + stop) + PID=/var/run/btsync/btsync.pid + if [ -f $PID ]; then + echo "Stop BitTorrent Sync..." + kill "`cat /var/run/btsync/btsync.pid`" + else + echo "BitTorrent Sync is not running..." + exit 1 + fi + ;; + start) + echo "Start BitTorrent Sync..." + /usr/bin/btsync --config /etc/btsync.conf + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 { start | stop | restart }" >&2 + exit 1 + ;; +esac |