2009-01-29 16:24:13 +11:00
|
|
|
#
|
|
|
|
# /etc/rc.d/nginx: start, stop or retart nginx server
|
|
|
|
#
|
|
|
|
|
|
|
|
case $1 in
|
2009-01-29 16:40:39 +11:00
|
|
|
start)
|
|
|
|
if [ -s /var/run/nginx.pid ]
|
|
|
|
then
|
|
|
|
echo "nginx is already running"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
/usr/sbin/nginx
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
kill -QUIT `cat /var/run/nginx.pid`
|
|
|
|
;;
|
|
|
|
reload)
|
|
|
|
kill -HUP `cat /var/run/nginx.pid`
|
|
|
|
;;
|
|
|
|
upgrade)
|
|
|
|
kill -USR2 `cat /var/run/nginx.pid`
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "usage: nginx [start|stop|reload|upgrade]"
|
|
|
|
;;
|
2009-01-29 16:24:13 +11:00
|
|
|
esac
|
|
|
|
|
|
|
|
# End of file
|