snac_freebsd 521 B

123456789101112131415161718192021222324252627
  1. # PROVIDE: snac
  2. # REQUIRE: DAEMON
  3. # KEYWORD: shutdown
  4. . /etc/rc.subr
  5. name="snac"
  6. rcvar=snac_enable
  7. load_rc_config $name
  8. : ${snac_enable:=NO}
  9. : ${snac_user:="snac"}
  10. : ${snac_args:="httpd SNAC_DATA_PATH"}
  11. : ${snac_pidfile:="/var/run/snac/snac.pid"}
  12. : ${snac_rundir:="/var/run/snac"}
  13. start_precmd="snac_precmd"
  14. command="/usr/sbin/daemon"
  15. command_args="-P ${snac_pidfile} -r -f /usr/local/bin/snac ${snac_args}"
  16. snac_precmd()
  17. {
  18. install -d -m 755 -o ${snac_user} -g ${snac_user} ${snac_rundir}
  19. }
  20. run_rc_command "$1"