wok diff postfixadmin/receipt @ rev 19101

Up vlc (2.2.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed May 04 10:51:05 2016 +0200 (2016-05-04)
parents 51a1ebbda768
children 9560550c6164
line diff
     1.1 --- a/postfixadmin/receipt	Fri Oct 18 19:43:55 2013 +0000
     1.2 +++ b/postfixadmin/receipt	Wed May 04 10:51:05 2016 +0200
     1.3 @@ -49,9 +49,9 @@
     1.4  post_install()
     1.5  {
     1.6  	# Configure lighttpd server
     1.7 -	if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
     1.8 -		if ! grep -q /usr/share/postfixadmin/ $1/etc/lighttpd/lighttpd.conf; then
     1.9 -	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
    1.10 +	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
    1.11 +		if ! grep -q /usr/share/postfixadmin/ "$1/etc/lighttpd/lighttpd.conf"; then
    1.12 +	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/postfixadmin/" => "/usr/share/postfixadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.13  			if [ -z "$1" ]; then
    1.14  				# Start Web server.
    1.15  				/etc/init.d/lighttpd stop
    1.16 @@ -60,9 +60,9 @@
    1.17  		fi
    1.18  	fi
    1.19  	# Configure apache server
    1.20 -	if [ -f $1/etc/apache/httpd.conf ]; then
    1.21 -		if [ ! -f $1/etc/apache/conf.d/postfixadmin ]; then
    1.22 -			cat > $1/etc/apache/conf.d/postfixadmin <<EOT
    1.23 +	if [ -f "$1/etc/apache/httpd.conf" ]; then
    1.24 +		if [ ! -f "$1/etc/apache/conf.d/postfixadmin" ]; then
    1.25 +			cat > "$1/etc/apache/conf.d/postfixadmin" <<EOT
    1.26  <IfModule mod_alias.c>
    1.27      Alias /postfixadmin /usr/share/postfixadmin
    1.28  </IfModule>
    1.29 @@ -82,6 +82,3 @@
    1.30  		fi
    1.31  	fi
    1.32  }
    1.33 -
    1.34 -
    1.35 -