1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
#!/bin/sh -e
case "$1" in
configure)
cd /var/lib/lists-archives
if [ ! -f searchlists.log ]
then
touch searchlists.log
fi
if ! chown www-data.daemon searchlists.log; then true; fi
if [ ! -f /etc/lists-archives/index.html ]
then
if ! cp -a /usr/share/doc/lists-archives/examples/index.html \
/etc/lists-archives/index.html; then true; fi
fi
if [ ! -f /etc/lists-archives/conf.pl ]
then
if ! cp -a /usr/share/doc/lists-archives/examples/conf.pl \
/etc/lists-archives/conf.pl; then true; fi
fi
rm -f timestamp
echo -n "Rebuilding master index page ... "
/usr/lib/lists-archives/updatemail -x
echo "done."
if [ ! -f log ]
then
touch log
fi
if [ -d /usr/doc -a ! -e /usr/doc/lists-archives \
-a -d /usr/share/doc/lists-archives ]; then
ln -sf ../share/doc/lists-archives /usr/doc/lists-archives
fi
chown daemon.daemon /var/lib/lists-archives
chown -R daemon.list /var/lib/lists-archives/archives
chown -R daemon.list /var/lib/lists-archives/glimpse
chown -R daemon.list /var/lib/lists-archives/lists
chown -R daemon.list /var/lib/lists-archives/log
chmod -R ug+rwX,o+rX /var/lib/lists-archives/archives
chmod -R ug+rwX,o+rX /var/lib/lists-archives/glimpse
chmod -R ug+rwX,o+rX /var/lib/lists-archives/lists
chmod -R ug+rwX,o+rX /var/lib/lists-archives/log
echo "Building full webpages in background ... "
/etc/cron.daily/lists-archives &
;;
abort-upgrade|abort-remove|abort-deconfigure)
exit 0
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
|