wok-4.x diff php-mysql/receipt @ rev 1805

php-*: restart web server during reconfigure
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Dec 02 14:48:36 2008 +0000 (2008-12-02)
parents 8294794b7a81
children fac71ab90788
line diff
     1.1 --- a/php-mysql/receipt	Sun Nov 23 12:08:41 2008 +0000
     1.2 +++ b/php-mysql/receipt	Tue Dec 02 14:48:36 2008 +0000
     1.3 @@ -36,8 +36,12 @@
     1.4  	    sed -e 's|;.*extension=msql.so|;   extension=msql.so\nextension=mysql.so|' -i $1/etc/php.ini
     1.5  	# Start Web server.
     1.6  	while read daemon file; do
     1.7 -		if [ -z "$1" -a -f /etc/init.d/$daemon \
     1.8 -			     -a ! -f "/var/run/$file" ]; then
     1.9 +		[ -z "$1" ] || continue
    1.10 +		if [ -f "/var/run/$file" ]; then
    1.11 +			/etc/init.d/$daemon stop
    1.12 +			sleep 2
    1.13 +		fi
    1.14 +		if [ -f /etc/init.d/$daemon ]; then
    1.15  			/etc/init.d/$daemon start
    1.16  		fi
    1.17  	done <<EOT
    1.18 @@ -53,7 +57,9 @@
    1.19  
    1.20  	# Start Web server.
    1.21  	while read daemon file; do
    1.22 -		if [ -f /etc/init.d/$daemon -a ! -f "/var/run/$file" ]; then
    1.23 +		if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
    1.24 +			/etc/init.d/$daemon stop
    1.25 +			sleep 2
    1.26  			/etc/init.d/$daemon start
    1.27  		fi
    1.28  	done <<EOT