mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-05 00:55:44 +01:00
823f42a58c
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
29 lines
560 B
Bash
29 lines
560 B
Bash
#!/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
|