]> git.pld-linux.org Git - packages/nginx.git/commitdiff
Drop HTTPD_CONF and HTTPD_OPTS support from init/sysconfig
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Mon, 14 Oct 2013 10:04:50 +0000 (12:04 +0200)
committerJacek Konieczny <jajcus@jajcus.net>
Mon, 14 Oct 2013 10:10:12 +0000 (12:10 +0200)
HTTPD_CONF support was plain wrong. Seems just copied from Apache
httpd.init and uses a command-line option which is not supported
by nginx. And adds the option to the 'killproc' command too. This
just could not work.

HTTPD_OPTS could work, but was not documented, was named wrong
and seems quite useless (nginx command-line options do not provide
any useful functionality).

nginx-light.init
nginx-mail.init
nginx-perl.init
nginx-standard.init

index 69f9f3fb04657223cb53cdad97221d9688e526a8..98acafe60f3c518999314091f6b15f12786bd133 100755 (executable)
@@ -29,20 +29,11 @@ else
        exit 0
 fi
 
-if [ -d "${HTTPD_CONF:-'/etc/nginx/nginx-light.conf'}" ]; then
-       CFG="-f ${HTTPD_CONF:-'/etc/nginx/nginx-light.conf'}"
-elif [ -n "$HTTPD_CONF" ]; then
-       echo "error: HTTPD_CONF='$HTTPD_CONF': not a file, not a directory"
-       exit 1
-else
-       CFG=""
-fi
-
 start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/nginx-light ]; then
                msg_starting nginx-light
-               daemon nginx-light $CFG $HTTPD_OPTS
+               daemon nginx-light
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nginx-light
        else
@@ -54,7 +45,7 @@ stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/nginx-light ]; then
                msg_stopping nginx-light
-               killproc --waitforname nginx-light --waitfortime 60 nginx-light $CFG
+               killproc --waitforname nginx-light --waitfortime 60 nginx-light
                # Delete pidfile only when nginx was called successfully
                if [ $? -eq 0 ]; then
                        rm -f /var/lock/subsys/nginx-light /var/run/nginx-light.pid >/dev/null 2>&1
index cf2639e07a15cc39617650472c07206bd0a85a0a..9b0b9b6b8673d76a3bb030a611cae21a6c22803a 100755 (executable)
@@ -29,20 +29,11 @@ else
        exit 0
 fi
 
-if [ -d "${HTTPD_CONF:-'/etc/nginx/nginx-mail.conf'}" ]; then
-       CFG="-f ${HTTPD_CONF:-'/etc/nginx/nginx-mail.conf'}"
-elif [ -n "$HTTPD_CONF" ]; then
-       echo "error: HTTPD_CONF='$HTTPD_CONF': not a file, not a directory"
-       exit 1
-else
-       CFG=""
-fi
-
 start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/nginx-mail ]; then
                msg_starting nginx-mail
-               daemon /usr/sbin/nginx-mail $CFG $HTTPD_OPTS
+               daemon /usr/sbin/nginx-mail
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nginx-mail
        else
@@ -54,7 +45,7 @@ stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/nginx-mail ]; then
                msg_stopping nginx-mail
-               killproc --waitforname nginx-mail --waitfortime 60 nginx-mail $CFG
+               killproc --waitforname nginx-mail --waitfortime 60 nginx-mail
                # Delete pidfile only when nginx was called successfully
                if [ $? -eq 0 ]; then
                        rm -f /var/lock/subsys/nginx-mail /var/run/nginx-mail.pid >/dev/null 2>&1
index 5d928b9fb3ad802962a7d566cb830418be671e36..c1404488c6e3d6dde21499adea7ff099da7bc9ed 100755 (executable)
@@ -29,20 +29,11 @@ else
        exit 0
 fi
 
-if [ -d "${HTTPD_CONF:-'/etc/nginx/nginx-perl.conf'}" ]; then
-       CFG="-f ${HTTPD_CONF:-'/etc/nginx/nginx-perl.conf'}"
-elif [ -n "$HTTPD_CONF" ]; then
-       echo "error: HTTPD_CONF='$HTTPD_CONF': not a file, not a directory"
-       exit 1
-else
-       CFG=""
-fi
-
 start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/nginx-perl ]; then
                msg_starting nginx-perl
-               daemon /usr/sbin/nginx-perl $CFG $HTTPD_OPTS
+               daemon /usr/sbin/nginx-perl
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nginx-perl
        else
@@ -54,7 +45,7 @@ stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/nginx-perl ]; then
                msg_stopping nginx-perl
-               killproc --waitforname nginx-perl --waitfortime 60 nginx-perl $CFG
+               killproc --waitforname nginx-perl --waitfortime 60 nginx-perl
                # Delete pidfile only when nginx was called successfully
                if [ $? -eq 0 ]; then
                        rm -f /var/lock/subsys/nginx-perl /var/run/nginx-perl.pid >/dev/null 2>&1
index 295cd3050d7868176331e47f7dd6359c18b2cce1..4731b2c589dbdee45c7d4454bff74cb1e5ef2f45 100755 (executable)
@@ -29,20 +29,11 @@ else
        exit 0
 fi
 
-if [ -d "${HTTPD_CONF:-'/etc/nginx/nginx-standard.conf'}" ]; then
-       CFG="-f ${HTTPD_CONF:-'/etc/nginx/nginx-standard.conf'}"
-elif [ -n "$HTTPD_CONF" ]; then
-       echo "error: HTTPD_CONF='$HTTPD_CONF': not a file, not a directory"
-       exit 1
-else
-       CFG=""
-fi
-
 start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/nginx-standard ]; then
                msg_starting nginx-standard
-               daemon /usr/sbin/nginx-standard $CFG $HTTPD_OPTS
+               daemon /usr/sbin/nginx-standard
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nginx-standard
        else
@@ -54,7 +45,7 @@ stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/nginx-standard ]; then
                msg_stopping nginx-standard
-               killproc --waitforname nginx-standard --waitfortime 60 nginx-standard $CFG
+               killproc --waitforname nginx-standard --waitfortime 60 nginx-standard
                # Delete pidfile only when nginx was called successfully
                if [ $? -eq 0 ]; then
                        rm -f /var/lock/subsys/nginx-standard /var/run/nginx-standard.pid >/dev/null 2>&1
This page took 0.084353 seconds and 4 git commands to generate.