summaryrefslogtreecommitdiff
path: root/network/nginx/rc.nginx
diff options
context:
space:
mode:
Diffstat (limited to 'network/nginx/rc.nginx')
-rw-r--r--network/nginx/rc.nginx24
1 files changed, 10 insertions, 14 deletions
diff --git a/network/nginx/rc.nginx b/network/nginx/rc.nginx
index 88b917d360..0c82902992 100644
--- a/network/nginx/rc.nginx
+++ b/network/nginx/rc.nginx
@@ -1,38 +1,34 @@
#!/bin/sh
#
# Nginx daemon control script.
-#
-# This is an init script for the nginx daemon.
-# To use nginx, you must first set up the config file(s).
-#
-# Written for Slackware Linux by Cherife Li <cherife@dotimes.com>.
+# Written for Slackware Linux by Cherife Li <cherife-#-dotimes.com>.
-DAEMON=/usr/sbin/nginx
+BIN=/usr/sbin/nginx
CONF=/etc/nginx/nginx.conf
PID=/var/run/nginx.pid
nginx_start() {
# Sanity checks.
if [ ! -r $CONF ]; then # no config file, exit:
- echo "$CONF does not appear to exist; exiting..."
+ echo "$CONF does not appear to exist. Abort."
exit 1
fi
if [ -s $PID ]; then
- echo "Nginx appears to already be running..."
+ echo "Nginx appears to already be running?"
exit 1
fi
- echo "Starting Nginx server daemon:"
- if [ -x $DAEMON ]; then
- $DAEMON -c $CONF
+ echo "Starting Nginx server daemon..."
+ if [ -x $BIN ]; then
+ $BIN -c $CONF
fi
}
nginx_test_conf() {
echo "Checking configuration for correct syntax and"
echo "then trying to open files referenced in configuration..."
- $DAEMON -t -c $CONF
+ $BIN -t -c $CONF
}
nginx_term() {
@@ -61,7 +57,7 @@ nginx_upgrade() {
nginx_restart() {
nginx_quit
- sleep 5
+ sleep 3
nginx_start
}
@@ -88,5 +84,5 @@ case "$1" in
nginx_upgrade
;;
*)
- echo "usage: $0 {check|start|term|stop|reload|restart|upgrade}"
+ echo "usage: `basename $0` {check|start|term|stop|reload|restart|upgrade}"
esac