mirror of
https://github.com/Ponce/slackbuilds
synced 2024-10-16 20:43:59 +02:00
30 lines
534 B
Text
30 lines
534 B
Text
|
#!/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
|