Added warning that this script isn't supposed
authorFabian Keil <fk@fabiankeil.de>
Sat, 18 Nov 2006 14:06:14 +0000 (14:06 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sat, 18 Nov 2006 14:06:14 +0000 (14:06 +0000)
to be sourced in other rc scripts. Should prevent
bug reports like #1542947.

Changed command line order to make sure
the config file is the last argument.
Thanks to William for reporting this.

slackware/rc.privoxy.orig

index 632a6b7..4c734ff 100644 (file)
@@ -1,5 +1,9 @@
 #!/bin/sh
 #  ********************************************************************
+#  This script uses exit to return proper error codes,
+#  sourcing (. /path/to/rc.privoxy) it in your system's
+#  rc files is a bad idea.
+#  ********************************************************************
 
 RETVAL=1
 
@@ -19,14 +23,14 @@ if [ ! -f $PRIVOXY_CONF ] ; then exit 0 ;fi
 
 # See how we were called.
 
-PRIVOXY="$PRIVOXY_BIN $PRIVOXY_CONF"
+PRIVOXY="$PRIVOXY_BIN --user $PRIVOXY_USER.$PRIVOXY_GROUP --pidfile $PRIVOXY_PID $PRIVOXY_CONF"
 
 start () {
        # start daemon
        echo -n $"Starting $PRIVOXY_PRG: "
 
        if [ ! -f $PRIVOXY_PID ]; then
-               ($PRIVOXY --user $PRIVOXY_USER.$PRIVOXY_GROUP  --pidfile $PRIVOXY_PID 2>/dev/tty9 ) \
+               ( $PRIVOXY 2>/dev/tty9 ) \
                        && echo " OK" \
                        && /bin/touch /var/lock/$PRIVOXY_PRG \
                        && RETVAL=0