wok-current diff php-pgsql/receipt @ rev 1316

cpulimit: fix short description
author Paul Issott <paul@slitaz.org>
date Wed Aug 27 21:10:57 2008 +0000 (2008-08-27)
parents 443dbfefc6bf
children 8294794b7a81
line diff
     1.1 --- a/php-pgsql/receipt	Sat Jul 26 14:23:50 2008 +0000
     1.2 +++ b/php-pgsql/receipt	Wed Aug 27 21:10:57 2008 +0000
     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=pgsql.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