X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=php5-cn.git;a=blobdiff_plain;f=debian%2Fpostinst;h=f15b8a68b493bfac901765651ac608977341e023;hp=cbb3a378a073b0d059650764f9eb9affd014fc44;hb=e5918b19b1cb2efa40d801c6643ea44dc0eefc4d;hpb=2ed83ded0b7a9b2775e99116bdb576aa961ffc8a diff --git a/debian/postinst b/debian/postinst index cbb3a37..f15b8a6 100755 --- a/debian/postinst +++ b/debian/postinst @@ -58,16 +58,19 @@ 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. @@ -125,15 +128,15 @@ for SAPI in apache apache2 cgi cli; do if [ -f "$ini_file" ]; then - cp_check_and_sed "^[[:space:]]*upload_max_filesize[[:space:]]*=[[:space:]]*2M$" \ + cp_check_and_sed "^[[:space:]]*upload_max_filesize[[:space:]]*=[[:space:]]*2M" \ 's/^[[:space:]]*upload_max_filesize[[:space:]]*=.*/upload_max_filesize = 256M/' \ "$ini_file" && need_restart=1 || true - cp_check_and_sed "^[[:space:]]*post_max_size[[:space:]]*=[[:space:]]*8M$" \ + cp_check_and_sed "^[[:space:]]*post_max_size[[:space:]]*=[[:space:]]*8M" \ 's/^[[:space:]]*post_max_size[[:space:]]*=.*/post_max_size = 256M/' \ "$ini_file" && need_restart=1 || true - cp_check_and_sed "^[[:space:]]*memory_limit[[:space:]]*=[[:space:]]*16M$" \ + cp_check_and_sed "^[[:space:]]*memory_limit[[:space:]]*=[[:space:]]*16M" \ 's/^[[:space:]]*memory_limit[[:space:]]*=.*/memory_limit = 256M/' \ "$ini_file" && need_restart=1 || true fi