From ac3f1fcff2b82980e6b2dda58ecd3339833b8764 Mon Sep 17 00:00:00 2001 From: Dragan Dosen Date: Thu, 27 Dec 2007 16:43:01 +0000 Subject: [PATCH] r2: * izmjene unutar postinst skripte i control datoteke. --- debian/control | 1 + debian/postinst | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/debian/control b/debian/control index 68bf93a..43bcee9 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,5 @@ Source: php4-cn +Priority: optional Section: web Maintainer: Dragan Dosen Origin: carnet diff --git a/debian/postinst b/debian/postinst index 5a3279c..a806b2b 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,9 +4,6 @@ set -e [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx -# Source debconf library. -. /usr/share/debconf/confmodule - case "$1" in configure) # continue below @@ -112,17 +109,21 @@ done # for SAPI in apache apache2 cgi cli; do - ini_file="$PHP4DIR/$SAPI/php.ini" + if [ ! -d "$PHP5DIR/$SAPI" ]; then + continue + fi - cp_echo "CN: Checking and enabling some CARNet specific parameters in file $ini_file" + ini_file="$PHP5DIR/$SAPI/php.ini" + cp_echo "CN: Checking and enabling some CARNet specific parameters in file $ini_file" + if [ -f "$ini_file" ]; then 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 @@ -163,14 +164,14 @@ done if [ $need_restart -eq 1 ]; then # Check Apache2 web server configuration. - if apache2ctl configtest 2>/dev/null; then + if /usr/sbin/apache2ctl configtest 2>/dev/null; then # Restart Apache2 web server. if [ -x "/etc/init.d/apache2" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d apache2 restart || exit $? + invoke-rc.d apache2 force-reload || true else - /etc/init.d/apache2 restart || exit $? + /etc/init.d/apache2 force-reload || true fi fi else -- 1.7.10.4