nginx_startstop Revision 50e531cba254 (Tue Dec 16 2008 at 17:05) - Diff Link to this snippet: https://friendpaste.com/2WJXhk3rhuqR0xVQAeBF88 Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051#! /bin/sh### BEGIN INIT INFO# Provides: nginx# Required-Start: $all# Required-Stop: $all# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: starts the nginx web server# Description: starts nginx using start-stop-daemon### END INIT INFOPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binDAEMON=/usr/local/nginx/sbin/nginxPIDFILE=/var/run/nginx.pidNAME=nginxDESC=nginxtest -x $DAEMON || exit 0# Include nginx defaults if availableif [ -f /etc/default/nginx ] ; then . /etc/default/nginxfiset -ecase "$1" in start) echo -n "Starting $DESC "'\n' start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS ;; stop) echo -n "Stopping $DESC "'\n' start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON ;; restart|force-reload) $0 stop || true $0 start ;; reload) echo -n "Reloading $DESC configuration "'\n' start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE --exec $DAEMON ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 exit 1 ;;esac