siproxd.rc6 585 B

12345678910111213141516171819202122232425262728293031
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2016 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. depend() {
  5. need net
  6. }
  7. check_config() {
  8. if [[ ! -f /etc/siproxd.conf ]]; then
  9. eerror "Please create /etc/siproxd.conf first!"
  10. return 1
  11. fi
  12. return 0
  13. }
  14. start() {
  15. check_config || return 1
  16. ebegin "Starting siproxd"
  17. start-stop-daemon --start --exec /usr/sbin/siproxd -- \
  18. -p /var/run/siproxd/siproxd.pid -c /etc/siproxd.conf
  19. eend $?
  20. }
  21. stop() {
  22. ebegin "Stopping siproxd"
  23. start-stop-daemon --stop --pidfile /var/run/siproxd/siproxd.pid
  24. eend $?
  25. }