forked from ports/contrib
26 lines
362 B
Plaintext
26 lines
362 B
Plaintext
|
#
|
||
|
# /etc/rc.d/nginx: start, stop or retart nginx server
|
||
|
#
|
||
|
|
||
|
case $1 in
|
||
|
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 -USR2 `cat /var/run/nginx.pid`
|
||
|
;;
|
||
|
*)
|
||
|
echo "usage: nginx [start|stop|reload]"
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
# End of file
|