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)
|
2009-06-11 12:19:17 +10:00
|
|
|
if [ -s /var/run/nginx.pid -a ! -z "`pgrep nginx`" ]
|
2009-01-29 16:40:39 +11:00
|
|
|
then
|
|
|
|
echo "nginx is already running"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
/usr/sbin/nginx
|
|
|
|
;;
|
|
|
|
stop)
|
2009-12-12 11:20:23 +11:00
|
|
|
/usr/sbin/nginx -s quit
|
2009-01-29 16:40:39 +11:00
|
|
|
;;
|
|
|
|
*)
|
2009-04-11 20:27:25 +10:00
|
|
|
echo "usage: nginx [start|stop]"
|
2009-01-29 16:40:39 +11:00
|
|
|
;;
|
2009-01-29 16:24:13 +11:00
|
|
|
esac
|
|
|
|
|
|
|
|
# End of file
|