5 NGINX_CONFIG
="/etc/nginx/conf/nginx.conf"
11 function check_config
{
12 stat_busy
"Checking configuration"
13 /usr
/sbin
/nginx
-t -q -c "$NGINX_CONFIG"
27 stat_busy
"Starting Nginx"
28 if [ -s /var
/run
/nginx.pid
]; then
31 stat_busy
"Nginx is already running"
34 /usr
/sbin
/nginx
-c "$NGINX_CONFIG" &>/dev
/null
43 stat_busy
"Stopping Nginx"
44 NGINX_PID
=`cat /var/run/nginx.pid 2>/dev/null`
45 kill -QUIT $NGINX_PID &>/dev
/null
49 for i
in `seq 1 10`; do
50 [ -d /proc
/$NGINX_PID ] ||
{ stat_done
; rm_daemon nginx
; exit 0; }
64 if [ -s /var
/run
/nginx.pid
]; then
65 status
"Reloading Nginx Configuration" kill -HUP `cat /var/run/nginx.pid`
72 echo "usage: $0 {start|stop|restart|reload|check|careless_start}"