syncthing.initd 573 B

1234567891011121314151617181920212223
  1. #!/usr/bin/openrc-run
  2. # Copyright 1999-2014 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. # $Header: $
  5. depend() {
  6. need net
  7. }
  8. start() {
  9. ebegin "Starting syncthing"
  10. start-stop-daemon --start --make-pidfile --pidfile /run/syncthing.pid \
  11. --background --user ${SYNCTHING_USER} --name syncthing \
  12. --exec /usr/bin/syncthing -- -gui-address=${SYNCTHING_ADDRESS} ${SYNCTHING_ARGS}
  13. eend $?
  14. }
  15. stop() {
  16. ebegin "Stopping syncthing"
  17. start-stop-daemon --stop --pidfile /run/syncthing.pid --user ${SYNCTHING_USER}
  18. eend $?
  19. }