wok-4.x diff php-mysql/receipt @ rev 1317
Add fping
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Aug 28 08:39:05 2008 +0000 (2008-08-28) |
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 Aug 28 08:39:05 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=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