Nginx start stop script
#! /Bin/sh # chkconfig: 2345 90 10 # description: starts the nginx web serverPATH =/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} "> & 2 exit 3; esacexit 0