diff options
Diffstat (limited to 'net-p2p/syncthing/files/rc')
-rw-r--r-- | net-p2p/syncthing/files/rc/conf | 3 | ||||
-rw-r--r-- | net-p2p/syncthing/files/rc/init | 22 |
2 files changed, 25 insertions, 0 deletions
diff --git a/net-p2p/syncthing/files/rc/conf b/net-p2p/syncthing/files/rc/conf new file mode 100644 index 0000000..1580cae --- /dev/null +++ b/net-p2p/syncthing/files/rc/conf @@ -0,0 +1,3 @@ +SYNCTHING_USER="syncthing" +SYNCTHING_ADDRESS="127.0.0.1:8080" +SYNCTHING_ARGS=""
\ No newline at end of file diff --git a/net-p2p/syncthing/files/rc/init b/net-p2p/syncthing/files/rc/init new file mode 100644 index 0000000..029e567 --- /dev/null +++ b/net-p2p/syncthing/files/rc/init @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need net +} + +start() { + ebegin "Starting syncthing" + start-stop-daemon --start --make-pidfile --pidfile /var/run/syncthing.pid \ + --background --user ${SYNCTHING_USER} --name syncthing \ + --exec /usr/bin/syncthing -- -gui-address=${SYNCTHING_ADDRESS} ${SYNCTHING_ARGS} + eend $? +} + +stop() { + ebegin "Stopping syncthing" + start-stop-daemon --stop --pidfile /var/run/syncthing.pid --user ${SYNCTHING_USER} + eend $? +}
\ No newline at end of file |