wok-current rev 18592
apache, lighttpd: do not stop the running web server
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Nov 13 11:06:53 2015 +0100 (2015-11-13) |
parents | 06c9ab3aa2fa |
children | 73506165b4d6 |
files | apache/receipt lighttpd/receipt |
line diff
1.1 --- a/apache/receipt Fri Nov 13 10:58:30 2015 +0100 1.2 +++ b/apache/receipt Fri Nov 13 11:06:53 2015 +0100 1.3 @@ -103,12 +103,7 @@ 1.4 tazpkg reconfigure $pkg 1.5 done 1.6 [ -f $1/etc/php.ini ] && tazpkg get-install php-apache --root=$1 1.7 - if [ -z "$1" ]; then 1.8 - for i in lighttpd ; do 1.9 - [ -f /etc/init.d/$i ] && /etc/init.d/$i stop 1.10 - done 1.11 - /etc/init.d/$PACKAGE start 1.12 - fi 1.13 + [ "$1" ] || netstat -ltn | grep -q :80 || /etc/init.d/$PACKAGE start 1.14 } 1.15 1.16 # Rules to clean extras dirs or files
2.1 --- a/lighttpd/receipt Fri Nov 13 10:58:30 2015 +0100 2.2 +++ b/lighttpd/receipt Fri Nov 13 11:06:53 2015 +0100 2.3 @@ -97,10 +97,5 @@ 2.4 fi 2.5 # Just in case. 2.6 chown www.www $1/var/log/$PACKAGE 2.7 - if [ -z "$1" ]; then 2.8 - for i in apache httpd; do 2.9 - [ -f /etc/init.d/$i ] && /etc/init.d/$i stop 2.10 - done 2.11 - /etc/init.d/$PACKAGE start 2.12 - fi 2.13 + [ "$1" ] || netstat -ltn | grep -q :80 || /etc/init.d/$PACKAGE start 2.14 }