#!/bin/sh set -e #DEBHELPER# if [ "$1" != "remove" -a "$1" != "purge" ]; then exit 0 fi EXTENSIONRE="^[[:space:]]*extension[[:space:]]*=[[:space:]]*@dsoname@\.so" . /usr/share/debconf/confmodule for SAPI in `find /etc/php5/ -type d -maxdepth 1 -mindepth 1 | sed -e's#.*/##'` do # Use the same question for all extensions, because it's only # used once per package: right here. if [ -f "/etc/php5/$SAPI/php.ini" ] \ && grep -q "$EXTENSIONRE" /etc/php5/$SAPI/php.ini then db_set php5/remove_extension true db_title "PHP" db_subst php5/remove_extension extname @extname@ db_subst php5/remove_extension sapiconfig $SAPI db_input low php5/remove_extension || true db_go db_get php5/remove_extension if [ "$RET" = "true" ]; then grep -v "$EXTENSIONRE" < /etc/php5/$SAPI/php.ini \ > /etc/php5/$SAPI/php.ini.@dsoname@remove chmod --reference=/etc/php5/$SAPI/php.ini \ /etc/php5/$SAPI/php.ini.@dsoname@remove mv /etc/php5/$SAPI/php.ini.@dsoname@remove \ /etc/php5/$SAPI/php.ini fi db_fset php5/remove_extension seen false fi done exit 0