! /bin/shPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binDESC=”nginx daemon”NAME=nginxDAEMON=/usr/local/nginx/sbin/$NAMECONFIGFILE=/usr/local/nginx/conf/$NAME.confPIDFILE=/usr/local/nginx/logs/$NAME.pidSCRIPTNAME=/etc/init.d/$NAMEset -e[ -x “$DAEMON” ] || exit 0do_start() {$DAEMON -c $CONFIGFILE || echo -n “nginx already running”}do_stop() {kill -INT cat $PIDFILE || echo -n “nginx not running”}do_reload() {kill -HUP cat $PIDFILE || echo -n “nginx can’t reload”}case “$1” instart)echo -n “Starting $DESC: $NAME”do_startecho “.”;;stop)echo -n “Stopping $DESC: $NAME”do_stopecho “.”;;reload|graceful)echo -n “Reloading $DESC configuration…”do_reloadecho “.”;;restart)echo -n “Restarting $DESC: $NAME”do_stopdo_startecho “.”;;*)echo “Usage: $SCRIPTNAME {start|stop|reload|restart}” >&2exit 3;;esacexit 02015-11-13 ! /bin/shPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binDESC=”nginx daemon”NAME=nginxDAEMON=/usr/local/nginx/sbin/$NAMECONFIGFILE=/usr/local/nginx/conf/$NAME.confPIDFILE=/usr/local/nginx/logs/$NAME.pidSCRIPTNAME=/etc/init.d/$NAMEset -e[ -x “$DAEMON” ] || exit 0do_start() {$DAEMON -c $CONFIGFILE || echo -n “nginx already running”}do_stop() {kill -INT cat $PIDFILE || echo -n “nginx not running”}do_reload() {kill -HUP cat $PIDFILE || echo -n “nginx can’t reload”}case “$1” instart)echo -n “Starting $DESC: $NAME”do_startecho “.”;;stop)echo -n “Stopping $DESC: $NAME”do_stopecho “.”;;reload|graceful)echo -n “Reloading $DESC configuration…”do_reloadecho “.”;;restart)echo -n “Restarting $DESC: $NAME”do_stopdo_startecho “.”;;*)echo “Usage: $SCRIPTNAME {start|stop|reload|restart}” >&2exit 3;;esacexit 0