summaryrefslogtreecommitdiff
path: root/network/nginx/rc.nginx
diff options
context:
space:
mode:
authorCherife Li <cherife-#-dotimes.com>2010-05-12 17:43:58 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-12 17:43:58 +0200
commitba227da84ad1fc6ff7acf46df072649bd54086f1 (patch)
tree59a60e3723d8b2d8d5a845fe18ca9f3e1d5e9f5a /network/nginx/rc.nginx
parentf7aaa9cc9279b5b759fc7ef72681d477f61b61e7 (diff)
downloadslackbuilds-ba227da84ad1fc6ff7acf46df072649bd54086f1.tar.gz
network/nginx: Updated for version 0.7.27
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