3 # nginx Nginx Web Server (perl version)
6 # description: Nginx is a World Wide Web server. It is used to serve \
8 # processname: nginx-perl
9 # pidfile: /var/run/nginx-perl.pid
10 # config: /etc/nginx/nginx-perl.conf
13 # Source function library
14 . /etc/rc.d/init.d/functions
17 . /etc/sysconfig/network
20 [ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
22 # Check that networking is up.
23 if is_yes "${NETWORKING}"; then
24 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
25 msg_network_down nginx-perl
33 # Check if the service is already running?
34 if [ ! -f /var/lock/subsys/nginx-perl ]; then
35 msg_starting nginx-perl
36 daemon /usr/sbin/nginx-perl
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nginx-perl
40 msg_already_running nginx-perl
46 if [ -f /var/lock/subsys/nginx-perl ]; then
47 msg_stopping nginx-perl
48 killproc --waitforname nginx-perl --waitfortime 60 nginx-perl
49 # Delete pidfile only when nginx was called successfully
51 rm -f /var/lock/subsys/nginx-perl /var/run/nginx-perl.pid >/dev/null 2>&1
54 msg_not_running nginx-perl
59 # See how we were called.
75 reload|force-reload|graceful)
76 if [ -f /var/lock/subsys/nginx-perl ]; then
77 msg_reloading nginx-perl
78 killproc nginx-perl -HUP
81 msg_not_running nginx-perl
86 msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|status}"