CONFDIR=/etc/privoxy
CONFIG=$CONFDIR/config
+EXAMPLE_CONFIG=/usr/share/privoxy/config
+
+. /usr/share/debconf/confmodule
case "$1" in
configure)
chown -R privoxy:adm /var/log/privoxy
chmod 750 /var/log/privoxy
chown privoxy $CONFDIR/user.action $CONFDIR/trust
- [ -f $CONFDIR/matcha-all.action ] \
+ [ -f $CONFDIR/match-all.action ] \
&& chown privoxy $CONFDIR/match-all.action
+ db_get privoxy/listen-address || true
+ perl -le '
+ $done = 0;
+ while (<STDIN>) {
+ chomp;
+ if ($_ =~ m/^\s*listen-address\s+.*/) {
+ if (!$done) {
+ foreach (@ARGV) {
+ print "listen-address $_";
+ }
+ }
+ $done = 1;
+ } else {
+ print;
+ }
+ }' \
+ $RET \
+ < $EXAMPLE_CONFIG > $CONFIG.ucftmp
+ ucf --three-way --debconf-ok $CONFIG.ucftmp $CONFIG
+ ucfr privoxy $CONFIG
+ rm -f $CONFIG.ucftmp
+
if [ "x$2" != "x" ] && dpkg --compare-versions "$2" lt "3.0.4"
then
# Upgrading from a 3.0.3* version