Advertisement
sdrinf

Untitled

Nov 8th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. # nginx
  2.  
  3. description "nginx http daemon"
  4. author "George Shammas <georgyo@gmail.com>"
  5.  
  6. start on (filesystem and net-device-up IFACE=lo)
  7. stop on runlevel [!2345]
  8.  
  9. env DAEMON=/usr/sbin/nginx
  10. env PID=/var/run/nginx.pid
  11.  
  12. expect fork
  13. respawn
  14. respawn limit 10 5
  15. #oom never
  16.  
  17. # Test the nginx configuration (Upstart will not proceed if this fails)
  18. pre-start exec $DAEMON -t
  19.  
  20. # Ensure nginx is shutdown gracefully
  21. # Upstart will be tracking the wrong PID so the following is needed to stop nginx
  22. post-stop exec $DAEMON -s stop
  23.  
  24. exec $DAEMON
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement