Skip to content

Commit

Permalink
nginx init.d
Browse files Browse the repository at this point in the history
the original one doesn't seem to work well
  • Loading branch information
ashchan committed Jan 23, 2010
1 parent 1f488df commit 785a908
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions config/stack/nginx/init.d
Expand Up @@ -16,7 +16,7 @@ DAEMON=/usr/local/nginx/sbin/nginx
NAME=nginx
DESC=nginx

test -x $DAEMON || echo -n "$DESC daemon not found at $DAEMON" exit 0
test -x $DAEMON || exit 0

# Include nginx defaults if available
if [ -f /etc/default/nginx ] ; then
Expand Down Expand Up @@ -48,16 +48,16 @@ case "$1" in
echo "$NAME."
;;
reload)
echo -n "Reloading $DESC configuration: "
start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \
--exec $DAEMON
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0
echo -n "Reloading $DESC configuration: "
start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/$NAME.pid \
--exec $DAEMON
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac

exit 0

0 comments on commit 785a908

Please sign in to comment.