# HG changeset patch # User Pascal Bellard # Date 1229856674 0 # Node ID 9009ad93df569dce986d2d8309c773a883602c7c # Parent 5bc6c4ca792e1c757d253437d3cfdb9645f85251 apache,lighttpd*: ensure only one web server is running diff -r 5bc6c4ca792e -r 9009ad93df56 apache/receipt --- a/apache/receipt Sat Dec 20 23:37:11 2008 +0100 +++ b/apache/receipt Sun Dec 21 10:51:14 2008 +0000 @@ -80,7 +80,12 @@ EOT - [ -z "$1" ] && /etc/init.d/$PACKAGE start + if [ -z "$1" ]; then + for i in lighttpd ; do + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop + done + /etc/init.d/$PACKAGE start + fi } # Rules to clean extras dirs or files diff -r 5bc6c4ca792e -r 9009ad93df56 lighttpd-ssl/receipt --- a/lighttpd-ssl/receipt Sat Dec 20 23:37:11 2008 +0100 +++ b/lighttpd-ssl/receipt Sun Dec 21 10:51:14 2008 +0000 @@ -97,8 +97,6 @@ } post_install() { - local root - root=$1 echo "Processing post-install commands..." if [ ! -f $1/etc/ssl/lighttpd/lighttpd.pem ]; then openssl req -new -x509 \ @@ -115,6 +113,11 @@ EOT fi # Just in case. - chown www.www $root/var/log/lighttpd - /etc/init.d/lighttpd start + chown www.www $1/var/log/lighttpd + if [ -z "$1" ]; then + for i in apache ; do + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop + done + /etc/init.d/$PACKAGE start + fi } diff -r 5bc6c4ca792e -r 9009ad93df56 lighttpd/receipt --- a/lighttpd/receipt Sat Dec 20 23:37:11 2008 +0100 +++ b/lighttpd/receipt Sun Dec 21 10:51:14 2008 +0000 @@ -83,10 +83,13 @@ } post_install() { - local root - root=$1 echo "Processing post-install commands..." # Just in case. - chown www.www $root/var/log/$PACKAGE - /etc/init.d/$PACKAGE start + chown www.www $1/var/log/$PACKAGE + if [ -z "$1" ]; then + for i in apache ; do + [ -f /etc/init.d/$i ] && /etc/init.d/$i stop + done + /etc/init.d/$PACKAGE start + fi }