First commit
This commit is contained in:
commit
7693c29676
102 changed files with 11831 additions and 0 deletions
32
files/services/S50nginx
Executable file
32
files/services/S50nginx
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Start/stop nginx
|
||||
#
|
||||
|
||||
NGINX=/usr/data/nginx/sbin/nginx
|
||||
PIDFILE=/var/run/nginx.pid
|
||||
NGINX_ARGS="-c /usr/data/nginx/nginx/nginx.conf"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting nginx..."
|
||||
mkdir -p /var/log/nginx /var/tmp/nginx
|
||||
start-stop-daemon -S -p "$PIDFILE" --exec "$NGINX" -- $NGINX_ARGS
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping nginx..."
|
||||
start-stop-daemon -K -x "$NGINX" -p "$PIDFILE" -o
|
||||
;;
|
||||
reload|force-reload)
|
||||
echo "Reloading nginx configuration..."
|
||||
"$NGINX" -s reload
|
||||
;;
|
||||
restart)
|
||||
"$0" stop
|
||||
sleep 1 # Prevent race condition: ensure nginx stops before start.
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload|force-reload}"
|
||||
exit 1
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue