net-p2p/syncthing: added syncthing launcher file
Package-Manager: portage-2.2.26
This commit is contained in:
parent
40cae1a861
commit
62f859e1d0
@ -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:
|
||||
|
30
net-p2p/syncthing/files/syncthing
Normal file
30
net-p2p/syncthing/files/syncthing
Normal 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 $?
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user