wok-stable diff php-pear/receipt @ rev 2484

gn*-gsasl: update depends
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 15 21:13:30 2009 +0000 (2009-03-15)
parents 111a98b98ac0
children cdb7f539e116
line diff
     1.1 --- a/php-pear/receipt	Sat Nov 29 10:38:27 2008 +0000
     1.2 +++ b/php-pear/receipt	Sun Mar 15 21:13:30 2009 +0000
     1.3 @@ -19,15 +19,34 @@
     1.4  }
     1.5  
     1.6  # Pre and post install commands for Tazpkg.
     1.7 +pre_install()
     1.8 +{
     1.9 +	while read daemon file; do
    1.10 +		if [ -z "$1" -a -f "/var/run/$file" ]; then
    1.11 +			/etc/init.d/$daemon stop
    1.12 +		fi
    1.13 +	done <<EOT
    1.14 +apache apache/httpd.pid
    1.15 +lighttpd lighttpd.pid
    1.16 +EOT
    1.17 +}
    1.18 +
    1.19  post_install()
    1.20  {
    1.21  	grep ^include_path $1/etc/php.ini
    1.22  	sed -i 's|/php/includes"|/php/includes"\ninclude_path = ".:/usr/share/php"|' $1/etc/php.ini
    1.23  	# Restart Web server.
    1.24 -	for daemon in apache lighttpd ; do
    1.25 +	while read daemon file; do
    1.26 +		[ -z "$1" ] || continue
    1.27 +		if [ -f "/var/run/$file" ]; then
    1.28 +			/etc/init.d/$daemon stop
    1.29 +			sleep 2
    1.30 +		fi
    1.31  		if [ -f /etc/init.d/$daemon ]; then
    1.32 -			/etc/init.d/$daemon stop
    1.33  			/etc/init.d/$daemon start
    1.34  		fi
    1.35 -	done
    1.36 +	done <<EOT
    1.37 +apache apache/httpd.pid
    1.38 +lighttpd lighttpd.pid
    1.39 +EOT
    1.40  }