X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=privoxy-generic.init;h=5189e8f15ff4c43331e24f74e40bdd15cd793ddb;hb=7c6b68ca9c6904520e7a69907be810b8dc679274;hp=a6d07ae814378713b026af60b3971ffe4dd6a484;hpb=d02bbf657292ae806414d0b3dfe1b0d63d1ac520;p=privoxy.git diff --git a/privoxy-generic.init b/privoxy-generic.init index a6d07ae8..5189e8f1 100755 --- a/privoxy-generic.init +++ b/privoxy-generic.init @@ -39,6 +39,19 @@ # # Revisions : # $Log: privoxy-generic.init,v $ +# Revision 1.5.2.1 2002/10/17 17:04:22 hal9 +# Add from main trunk. Will be needed for make install. +# +# Revision 1.5 2002/10/17 17:01:29 hal9 +# Set paths to match the defaults for a root install. Force remove PIDFILE on +# stop. +# +# Revision 1.4 2002/09/11 01:15:02 hal9 +# Fix typo in variable. Now tested on Solaris and Linux, with defaults. +# +# Revision 1.3 2002/09/11 01:09:14 hal9 +# Better handling of pidfile, and process owner. +# # Revision 1.2 2002/09/08 20:27:58 hal9 # -Rewrote script config section. # -Added comments to script. @@ -67,10 +80,10 @@ P_NAME=Privoxy # Path to executable. P_DAEMON=privoxy # Full path to location of Privoxy config file. -P_CONF_FILE=./config +P_CONF_FILE=/usr/local/etc/privoxy/config # Full path to PID file location. Location must be writable by # whoever runs this script. -P_PIDFILE=`pwd`/privoxy.pid +P_PIDFILE=/var/run/privoxy.pid # If uncommented, this script will try to run as USER=privoxy, which # may require special handling of config, *.action, trust, logfile, # jarfile, and pidfile. @@ -94,7 +107,7 @@ case "$1" in start) if [ -f $P_PIDFILE ]; then if kill -0 `cat $P_PIDFILE`; then - echo "Error: $NAME is already running, exiting." + echo "Error: $P_NAME is already running, exiting." exit 1 else rm -f $P_PIDFILE @@ -118,7 +131,7 @@ case "$1" in stop) test ! -f $P_PIDFILE && echo "No $P_PIDFILE file found, exiting." && exit 1 - kill `cat $P_PIDFILE` &&\ + kill `cat $P_PIDFILE` && rm -f $P_PIDFILE && \ echo "Stopping $P_NAME, OK." || echo "Stopping $P_NAME, failed." ;;