Package: polipo
Version: 1.0.4.1-1.2
Severity: minor
Tags: patch

I use polipo in a scenario where it is started only when my notebook is
connected to certain network environments. Most of the time the daemon
is not started.

The daily cron job exits with return code 1 when polipo is not running.
This results in the cron daemon sending a mail to root stating

run-parts: /etc/cron.daily/polipo exited with return code 1

This is a bit annoying.

The reason is simple as is the fix: The last line of the script is

[ -f "$PIDFILE" ] && kill -USR2 $(cat "$PIDFILE")

When polipo is not running then the PIDFILE does not exist and the test
fails. As it es the last command in the script this failure determines
the exit code of the script.

A simple

exit 0

as last line would fix that issue. (The attached /etc/cron.daily/polipo
already contains this fix.)

-- System Information:
Debian Release: 7.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages polipo depends on:
ii  dpkg          1.16.15
ii  install-info  4.13a.dfsg.1-10
ii  libc6         2.13-38+deb7u4

polipo recommends no packages.

polipo suggests no packages.

-- Configuration Files:
/etc/cron.daily/polipo changed:
set -e
FORBIDDEN_FILE=/etc/polipo/forbidden
CONFIG_FILE=/etc/polipo/config
if [ ! -x /usr/bin/polipo ]; then
  exit 0
fi
if [ ! -f $FORBIDDEN_FILE ]; then
  FORBIDDEN_FILE=/dev/null
fi  
PIDFILE=/var/run/polipo/polipo.pid
[ -f "$PIDFILE" ] && kill -USR1 $(cat "$PIDFILE")
su -c \
        "nice polipo -x -c $CONFIG_FILE forbiddenFile=$FORBIDDEN_FILE > 
/dev/null" \
        proxy
[ -f "$PIDFILE" ] && kill -USR2 $(cat "$PIDFILE")
exit 0

/etc/polipo/config changed:
                                            
tunnelAllowedPorts = 443, 1533, 16316, 8333, 5222
socksParentProxy = "localhost:1081"
socksProxyType = socks5
chunkHighMark = 819200
objectHighMark = 128
diskCacheRoot = ""


-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to