Permalink
Browse files

nginx init.d

the original one doesn't seem to work well
  • Loading branch information...
1 parent 1f488df commit 785a908db6fc97c42f03b5feee2c71acecff42c9 @ashchan ashchan committed Jan 23, 2010
Showing with 14 additions and 14 deletions.
  1. +14 −14 config/stack/nginx/init.d
View
@@ -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
@@ -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.