aboutsummaryrefslogtreecommitdiff
path: root/service/syncthing
blob: 8d0e0090f63dd201bca72bf3646e2f4c75349006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/home/cynerd/.local/sbin/user-service.sh
# vim: ft=sh

description="Syncthing is an open, trustworthy and decentralized cloud storage system"
pidfile="/tmp/syncthing-$USER.pid"
logfile="/var/log/syncthing-$USER.log"

status() {
	[ -f $pidfile ] || return 1
	kill -0 "$(cat $pidfile)" || return 1
}

start() {
	start-stop-daemon -S -bmp $pidfile -1 $logfile -2 $logfile -- syncthing -no-browser
}

stop() {
	start-stop-daemon -K -p $pidfile -x syncthing
}