# HG changeset patch # User Pascal Bellard # Date 1463996046 -7200 # Node ID 3630f18392bdee68c84b2f96d1c0680824f5cd34 # Parent 56ac50099f169a4b66cf4c3fd4707ffb30ce002d web server: stop running server in pre_install diff -r 56ac50099f16 -r 3630f18392bd apache/receipt --- a/apache/receipt Sat May 21 17:19:27 2016 +0200 +++ b/apache/receipt Mon May 23 11:34:06 2016 +0200 @@ -70,7 +70,9 @@ # We stop the server by default in case of upgarde. pre_install() { - [ -z "$1" ] && [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop + [ -z "$1" ] && for i in httpd lighttpd ngnix cherokee $PACKAGE ; do + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop + done } post_install() diff -r 56ac50099f16 -r 3630f18392bd lighttpd-ssl/receipt --- a/lighttpd-ssl/receipt Sat May 21 17:19:27 2016 +0200 +++ b/lighttpd-ssl/receipt Mon May 23 11:34:06 2016 +0200 @@ -95,7 +95,13 @@ # We stop the server by default in case of upgarde. pre_install() { - [ -f /etc/init.d/lighttpd ] && /etc/init.d/lighttpd stop + [ -z "$1" ] && for i in httpd lighttpd ngnix apache cherokee $PACKAGE ; do + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop + done + # Backup config file. + if [ -d "$1/etc/lighttpd" ]; then + cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak" + fi } post_install() diff -r 56ac50099f16 -r 3630f18392bd lighttpd/receipt --- a/lighttpd/receipt Sat May 21 17:19:27 2016 +0200 +++ b/lighttpd/receipt Mon May 23 11:34:06 2016 +0200 @@ -79,7 +79,9 @@ # We stop the server by default in case of upgarde. pre_install() { - [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop + [ -z "$1" ] && for i in httpd ngnix apache cherokee $PACKAGE ; do + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop + done # Backup config file. if [ -d "$1/etc/lighttpd" ]; then cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak" diff -r 56ac50099f16 -r 3630f18392bd nginx/receipt --- a/nginx/receipt Sat May 21 17:19:27 2016 +0200 +++ b/nginx/receipt Mon May 23 11:34:06 2016 +0200 @@ -67,7 +67,9 @@ # We stop the server by default in case of upgarde. pre_install() { - [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop + [ -z "$1" ] && for i in httpd lighttpd apache cherokee $PACKAGE ; do + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop + done # Backup config file. if [ -d "$1/$CONFIG_FILES" ]; then cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"