mrouted.rc 603 B

123456789101112131415161718192021222324252627282930
  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. use logger
  6. need net
  7. }
  8. checkconfig() {
  9. if [ ! -e /etc/mrouted.conf ] ; then
  10. eerror "You need an /etc/mrouted.conf file to run mrouted"
  11. return 1
  12. fi
  13. }
  14. start() {
  15. checkconfig || return 1
  16. ebegin "Starting mrouted"
  17. start-stop-daemon --start --quiet --pidfile /var/run/mrouted.pid \
  18. --startas /usr/bin/mrouted -- -c /etc/mrouted.conf
  19. eend $?
  20. }
  21. stop() {
  22. ebegin "Stopping mrouted"
  23. start-stop-daemon --stop --quiet --pidfile /var/run/mrouted.pid
  24. eend $?
  25. }