- SQCONF=/etc/squirrelmail/config.php
-
- cp_echo "CN: Disabling SquirrelMail change_pass plugin in $SQCONF"
- cp_check_and_sed '^\$plugins.*change_pass' \
- '/^\$plugins.*change_pass/d' \
- "$SQCONF" || true
+ if egrep -q '^\$plugins\[[0-9]+\][\ ]*=[\ ]*'\''change_pass'\' "$SQCONF"; then
+ /usr/sbin/squirrelmail-configure --remove-plugin change_pass
+ fi