8 # Include CARNet functions
9 . /usr/share/carnet-tools/functions.sh
11 PKG="squirrelmail-change-pass-cn"
14 # Remove CARNet configuration from /etc/hosts.allow and
17 if [ -f "/etc/hosts.allow" ]; then
18 cp-update -r "$PKG" /etc/hosts.allow
20 if [ -f "/etc/hosts.deny" ]; then
21 cp-update -r "$PKG" /etc/hosts.deny
24 # Remove SquirrelMail change_pass plugin from SquirrelMail
27 SQCONF=/etc/squirrelmail/config.php
29 cp_echo "CN: Disabling SquirrelMail change_pass plugin in $SQCONF"
30 cp_check_and_sed '^\$plugins.*change_pass' \
31 '/^\$plugins.*change_pass/d' \
34 # Remove poppassd service from xinetd.
36 if [ -f "/etc/xinetd.d/poppassd" ]; then
38 if egrep -q "^# Begin update by CARNet package " /etc/xinetd.d/poppassd; then
40 cp_echo "CN: Removing poppassd service from xinetd configuration."
41 rm -f /etc/xinetd.d/poppassd
46 # Restart xinetd if needed.
48 if [ $need_restart -eq 1 ]; then
50 if [ -x "/etc/init.d/xinetd" ]; then
51 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
52 invoke-rc.d xinetd restart || exit $?
54 /etc/init.d/xinetd restart || exit $?
71 echo "prerm called with unknown argument \$1'" >&2