wok-6.x diff php-mysql/receipt @ rev 1438

Fix: pcmciautils missing bison in BUILD_DENPS.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Thu Oct 02 00:00:10 2008 +0200 (2008-10-02)
parents a6ba323029ac
children 8294794b7a81
line diff
     1.1 --- a/php-mysql/receipt	Fri Jul 25 08:39:27 2008 +0000
     1.2 +++ b/php-mysql/receipt	Thu Oct 02 00:00:10 2008 +0200
     1.3 @@ -20,9 +20,14 @@
     1.4  # and restart Web server if needed.
     1.5  pre_install()
     1.6  {
     1.7 -	if [ -z "$1" -a -f "/var/run/lighttpd.pid" ]; then
     1.8 -		/etc/init.d/lighttpd stop
     1.9 -	fi
    1.10 +	while read daemon file; do
    1.11 +		if [ -z "$1" -a -f "/var/run/$file" ]; then
    1.12 +			/etc/init.d/$daemon stop
    1.13 +		fi
    1.14 +	done <<EOT
    1.15 +apache apache/httpd.pid
    1.16 +lighttpd lighttpd.pid
    1.17 +EOT
    1.18  }
    1.19  
    1.20  post_install()
    1.21 @@ -30,8 +35,14 @@
    1.22  	grep -q ^extension=msql.so $1/etc/php.ini || \
    1.23  	    sed -e 's|;.*extension=msql.so|;   extension=msql.so\nextension=mysql.so|' -i $1/etc/php.ini
    1.24  	# Start Web server.
    1.25 -	if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then
    1.26 -		/etc/init.d/lighttpd start
    1.27 -	fi
    1.28 +	while read daemon file; do
    1.29 +		if [ -z "$1" -a -f /etc/init.d/$daemon \
    1.30 +			     -a ! -f "/var/run/$file" ]; then
    1.31 +			/etc/init.d/$daemon start
    1.32 +		fi
    1.33 +	done <<EOT
    1.34 +apache apache/httpd.pid
    1.35 +lighttpd lighttpd.pid
    1.36 +EOT
    1.37  }
    1.38