X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=50c3ec76a9b12586f168ec6839960d1f8266b560;hb=0610511d69e99cd091bb0df2699246037c617613;hp=1f6771e8d2c116d5aa2a1e90e3e2c1bb71533239;hpb=77da50f4913fa24efe0e061cca00093b7e09991e;p=php5-cn.git diff --git a/debian/postinst b/debian/postinst index 1f6771e..50c3ec7 100755 --- a/debian/postinst +++ b/debian/postinst @@ -25,7 +25,7 @@ esac PKG="php5-cn" A2MODEDIR="/etc/apache2/mods-enabled" -EXTENSIONS="mysql ldap gd" +EXTENSIONS="mysql" PHP5DIR="/etc/php5" PHP5CONFD="/etc/php5/conf.d" @@ -48,7 +48,7 @@ if [ -e /etc/apache2/apache2.conf ]; then fi -# Check if PHP5 extensions (MySQL, LDAP, GD) are enabled. +# Check if PHP5 extensions are enabled. # for php5ext in $EXTENSIONS; do @@ -58,18 +58,27 @@ for php5ext in $EXTENSIONS; do # configuration files. for SAPI in apache apache2 cgi cli; do - ini_file="$PHP5DIR/$SAPI/php.ini" + if [ -d "$PHP5DIR/$SAPI" ]; then + + ini_file="$PHP5DIR/$SAPI/php.ini" - if [ -f "$ini_file" ]; then + if [ -f "$ini_file" ]; then cp_echo "CN: Removing $php5ext extension from file $ini_file" cp_check_and_sed "$php5ext_re" \ "/$php5ext_re/d" \ "$ini_file" && need_restart=1 || true - fi + fi + fi done + # Check $PHP5CONFD directory. + if [ ! -d "$PHP5CONFD" ]; then + cp_echo "CN: Creating configuration directory $PHP5CONFD" + mkdir $PHP5CONFD + fi + # Check extension configuration in /etc/php5/conf.d/ directory. if [ ! -f "$PHP5CONFD/$php5ext.ini" ]; then