wok rev 19147
web server: stop running server in pre_install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon May 23 11:34:06 2016 +0200 (2016-05-23) |
parents | 56ac50099f16 |
children | 4125548935d3 |
files | apache/receipt lighttpd-ssl/receipt lighttpd/receipt nginx/receipt |
line diff
1.1 --- a/apache/receipt Sat May 21 17:19:27 2016 +0200 1.2 +++ b/apache/receipt Mon May 23 11:34:06 2016 +0200 1.3 @@ -70,7 +70,9 @@ 1.4 # We stop the server by default in case of upgarde. 1.5 pre_install() 1.6 { 1.7 - [ -z "$1" ] && [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop 1.8 + [ -z "$1" ] && for i in httpd lighttpd ngnix cherokee $PACKAGE ; do 1.9 + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop 1.10 + done 1.11 } 1.12 1.13 post_install()
2.1 --- a/lighttpd-ssl/receipt Sat May 21 17:19:27 2016 +0200 2.2 +++ b/lighttpd-ssl/receipt Mon May 23 11:34:06 2016 +0200 2.3 @@ -95,7 +95,13 @@ 2.4 # We stop the server by default in case of upgarde. 2.5 pre_install() 2.6 { 2.7 - [ -f /etc/init.d/lighttpd ] && /etc/init.d/lighttpd stop 2.8 + [ -z "$1" ] && for i in httpd lighttpd ngnix apache cherokee $PACKAGE ; do 2.9 + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop 2.10 + done 2.11 + # Backup config file. 2.12 + if [ -d "$1/etc/lighttpd" ]; then 2.13 + cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak" 2.14 + fi 2.15 } 2.16 2.17 post_install()
3.1 --- a/lighttpd/receipt Sat May 21 17:19:27 2016 +0200 3.2 +++ b/lighttpd/receipt Mon May 23 11:34:06 2016 +0200 3.3 @@ -79,7 +79,9 @@ 3.4 # We stop the server by default in case of upgarde. 3.5 pre_install() 3.6 { 3.7 - [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop 3.8 + [ -z "$1" ] && for i in httpd ngnix apache cherokee $PACKAGE ; do 3.9 + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop 3.10 + done 3.11 # Backup config file. 3.12 if [ -d "$1/etc/lighttpd" ]; then 3.13 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
4.1 --- a/nginx/receipt Sat May 21 17:19:27 2016 +0200 4.2 +++ b/nginx/receipt Mon May 23 11:34:06 2016 +0200 4.3 @@ -67,7 +67,9 @@ 4.4 # We stop the server by default in case of upgarde. 4.5 pre_install() 4.6 { 4.7 - [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop 4.8 + [ -z "$1" ] && for i in httpd lighttpd apache cherokee $PACKAGE ; do 4.9 + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop 4.10 + done 4.11 # Backup config file. 4.12 if [ -d "$1/$CONFIG_FILES" ]; then 4.13 cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"