dnsmasq-init-r4 613 B

123456789101112131415161718192021222324252627282930
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2018 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License, v2 or later
  4. extra_started_commands="reload rotate"
  5. pidfile="/var/run/dnsmasq.pid"
  6. command="/usr/sbin/dnsmasq"
  7. command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
  8. retry="TERM/3/TERM/5"
  9. depend() {
  10. provide dns
  11. need localmount net
  12. after bootmisc
  13. use logger
  14. }
  15. reload() {
  16. ebegin "Reloading ${RC_SVCNAME}"
  17. start-stop-daemon --signal HUP --pidfile "${pidfile}"
  18. eend $?
  19. }
  20. rotate() {
  21. ebegin "Reopening ${RC_SVCNAME} log file"
  22. start-stop-daemon --signal USR2 --pidfile "${pidfile}"
  23. eend $?
  24. }