1
0
Fork 0

net-p2p/syncthing: added syncthing launcher file

Package-Manager: portage-2.2.26
This commit is contained in:
Horea Christian 2016-01-13 20:10:37 +01:00
parent 40cae1a861
commit 62f859e1d0
No known key found for this signature in database
GPG Key ID: 0D5087BE29AA1C79
2 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,6 @@
13 Jan 2016; <chymera@gentoo.org> +files/syncthing:
net-p2p/syncthing: added syncthing launcher file
*syncthing-0.12.12 (13 Jan 2016)
13 Jan 2016; <chymera@gentoo.org> +syncthing-0.12.12.ebuild:

View File

@ -0,0 +1,30 @@
#!/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 $?
}