-NAME=Privoxy
-DAEMON=privoxy
-P_CONF_FILE=/etc/${NAME}/config
-PIDFILE=/var/run/${NAME}.pid
-#RUN_AS="--user privoxy"
+P_NAME=Privoxy
+# Path to executable.
+P_DAEMON=privoxy
+# Full path to location of Privoxy config file.
+P_CONF_FILE=./config
+# Full path to PID file location. Location must be writable by
+# whoever runs this script.
+P_PIDFILE=`pwd`/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.
+P_USER=privoxy
+
+# If a privoxy user is specified, lets try that. /bin/sh does not seem to
+# know about $UID.
+if [ "$USER" = "root" ] && [ -n "$P_USER" ] && id $P_USER >/dev/null; then
+ P_OWNER=$P_USER
+else
+ P_OWNER=$USER
+fi