Guest User

Untitled

a guest
Oct 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # $FreeBSD: ports/www/varnish/files/varnishncsa.in,v 1.4 2010/03/27 00:15:19 dougb Exp $
  4. #
  5.  
  6. # PROVIDE: varnishncsa
  7. # REQUIRE: DAEMON
  8. # KEYWORD: shutdown
  9.  
  10. #
  11. # Add the following line to /etc/rc.conf to enable varnishncsa:
  12. #
  13. # varnishncsa_enable="YES"
  14. #
  15. # Configuration variables and their default values:
  16. #
  17. # varnishncsa_pidfile - full path to the PID file.
  18. # default: "/var/run/varnishncsa.pid"
  19. #
  20. # varnishncsa_file - full path to the log file.
  21. # default: "/var/log/varnishncsa.log"
  22. #
  23. # varnishncsa_flags - command line arguments.
  24. # default: "-D -P ${varnishncsa_pidfile} -a -c -w ${varnishncsa_file}"
  25. #
  26. # Add the following line to /etc/newsyslog.conf to rotate the log file
  27. # once a day:
  28. #
  29. # /var/log/varnishncsa.log 640 7 * @T00 JB /var/run/varnishncsa.pid
  30. #
  31. # See varnishncsa(1) for a detailed overview of command-line options.
  32. #
  33.  
  34. . /etc/rc.subr
  35.  
  36. name="varnishncsa"
  37. rcvar=`set_rcvar`
  38.  
  39. command="/usr/local/bin/${name}"
  40.  
  41. # read configuration and set defaults
  42. load_rc_config ${name}
  43. : ${varnishncsa_enable:="NO"}
  44. : ${varnishncsa_pidfile:="/var/run/${name}.pid"}
  45. : ${varnishncsa_file:="/var/log/${name}.log"}
  46. : ${varnishncsa_flags:="-P ${varnishncsa_pidfile} | logger -t varnishncsa"}
  47.  
  48. pidfile=${varnishncsa_pidfile}
  49. run_rc_command "$1"
Add Comment
Please, Sign In to add comment