Polipo cron task returns with exit code 1 if Polipo is not running
The Polipo cron job to reload the forbiddenFile and config file tries to not send a USR1/2 signal to Polipo if the PID file cannot be found. A side-effect of doing
[ -f "$PIDFILE" ] && kill -USR2 $(cat "$PIDFILE")
as the last line of a shell script is that if $PIDFILE does not exist, the shell script with exit will return code 1 (the return code of the last statement executed: [ -f "$PIDFILE" ]
).
This occurs when Polipo is installed, but configured to not run on startup, and will cause cron to send an email to root.
I am using Polipo 1.0.4.1-1.1 from Ubuntu Maverick.