species007
Newbie
Hallo Leute, das unter [1] abgelegte Startskript von Privoxy führt zu den unter [2] beschriebenen Fehlermeldungen. Was läuft falsch, und wie muss das Skript geändert werden? Für mich sind das nur kryptische Zeilen ...
Die unter [2] genannten Zeilen sind hervorgehoben, damit ihr nicht zählen müsst ;-))
Vielen Danke,
Michael
[1]
-----------------------------------------------------------------------------------------------------------------------------------
[2]
./privoxy: line 109: cat: command not found
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
./privoxy: line 113: rm: command not found
Starting Privoxy, Failed.
./privoxy: line 123: rm: command not found
Die unter [2] genannten Zeilen sind hervorgehoben, damit ihr nicht zählen müsst ;-))
Vielen Danke,
Michael
[1]
Code:
PATH=/usr/local/sbin
P_NAME=Privoxy
# Path to executable.
P_DAEMON=privoxy
# Full path to location of Privoxy config file.
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=/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.
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
if [ ! -f $P_CONF_FILE ]; then
echo "Can't find $P_CONF_FILE, exiting."
exit 1
fi
case "$1" in
start)
if [ -f $P_PIDFILE ]; then
[B] if kill -0 `cat $P_PIDFILE`; then[/B]
echo "Error: $P_NAME is already running, exiting."
exit 1
else
[B] rm -f $P_PIDFILE[/B]
fi
fi
$P_DAEMON --pidfile $P_PIDFILE --user $P_OWNER $P_CONF_FILE 2>/dev/null
if [ $? -eq 0 ]; then
echo "Starting $P_NAME, OK."
else
echo "Starting $P_NAME, Failed."
[B] rm -f $P_PIDFILE[/B]
fi
;;
restart)
$0 stop
$0 start
;;
stop)
test ! -f $P_PIDFILE && echo "No $P_PIDFILE file found, exiting." && exit 1
kill `cat $P_PIDFILE` && rm -f $P_PIDFILE && \
echo "Stopping $P_NAME, OK." || echo "Stopping $P_NAME, failed."
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0
[2]
./privoxy: line 109: cat: command not found
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
./privoxy: line 113: rm: command not found
Starting Privoxy, Failed.
./privoxy: line 123: rm: command not found