8 # Include CARNet functions
9 . /usr/share/carnet-tools/functions.sh
11 PKG="squirrelmail-change-pass-cn"
12 SQCONFDIR="/etc/squirrelmail"
13 SQCONF="$SQCONFDIR/config.php"
16 # Remove CARNet configuration from /etc/hosts.allow and
19 if [ -f /etc/hosts.allow ]; then
20 cp-update -r "$PKG" /etc/hosts.allow
22 if [ -f /etc/hosts.deny ]; then
23 cp-update -r "$PKG" /etc/hosts.deny
26 # Remove SquirrelMail change_pass plugin from SquirrelMail
29 if egrep -q '^\$plugins\[[0-9]+\][\ ]*=[\ ]*'\''change_pass'\' "$SQCONF"; then
30 /usr/sbin/squirrelmail-configure --remove-plugin change_pass
33 # Remove poppassd service from xinetd.
35 if [ -f /etc/xinetd.d/poppassd ]; then
37 if egrep -q "^# Begin update by CARNet package " /etc/xinetd.d/poppassd; then
39 cp_echo "CN: Removing poppassd service from xinetd configuration"
40 rm -f /etc/xinetd.d/poppassd
45 # Restart xinetd if needed.
47 if [ $need_restart -eq 1 ]; then
49 if [ -x "/etc/init.d/xinetd" ]; then
50 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
51 invoke-rc.d xinetd restart || exit $?
53 /etc/init.d/xinetd restart || exit $?
70 echo "prerm called with unknown argument \$1'" >&2