wok-4.x diff php-ldap/receipt @ rev 1389
Up: nmap 4.76
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Wed Sep 17 23:50:27 2008 +0200 (2008-09-17) |
parents | c13c815a576c |
children | 26099adb252a |
line diff
1.1 --- a/php-ldap/receipt Sun Jul 27 09:18:17 2008 +0000 1.2 +++ b/php-ldap/receipt Wed Sep 17 23:50:27 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=ldap.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