1
0
mirror of synced 2024-06-10 14:39:58 +02:00
TheChymera-overlay/net-p2p/syncthing/files/syncthing
Horea Christian c375811b17
net-p2p/syncthing: version bump
Package-Manager: portage-2.2.26
2016-01-21 02:20:03 +01:00

30 lines
648 B
Plaintext

#!/sbin/runscript
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
SVCUSER=${SVCNAME#*.}
pid_file="/run/syncthing-${SVCUSER}/syncthing.pid"
depend() {
need net
provide syncthing
}
start_pre() {
checkpath -d -m 0775 -o ${SVCUSER}:${SVCUSER} /run/syncthing-${SVCUSER}
}
start() {
ebegin "Starting Syncthing"
start-stop-daemon --start --make-pidfile --pidfile ${pid_file} \
--user ${SVCUSER} --group ${SVCUSER} --background --exec /usr/bin/syncthing -- -no-browser
eend $?
}
stop() {
ebegin "Stopping Syncthing"
start-stop-daemon --stop --pidfile ${pid_file}
eend $?
}