wok-6.x diff zerobin/receipt @ rev 18730

Quote root dir in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 20 15:13:45 2015 +0100 (2015-12-20)
parents d51b2411e55e
children 139df21c10dd
line diff
     1.1 --- a/zerobin/receipt	Sat Apr 05 10:12:34 2014 +0000
     1.2 +++ b/zerobin/receipt	Sun Dec 20 15:13:45 2015 +0100
     1.3 @@ -38,9 +38,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/zerobin/ $1/etc/lighttpd/lighttpd.conf; then
     1.9 -	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/paste/" => "/usr/share/zerobin/",|g' -i $1/etc/lighttpd/lighttpd.conf
    1.10 +	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
    1.11 +		if ! grep -q /usr/share/zerobin/ "$1/etc/lighttpd/lighttpd.conf"; then
    1.12 +	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/paste/" => "/usr/share/zerobin/",|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 @@ -49,10 +49,10 @@
    1.17  		fi
    1.18  	fi
    1.19  	# Configure apache server
    1.20 -	if [ -f $1/etc/apache/httpd.conf ]; then
    1.21 -		sed -i 's/lighttpd/apache/' $1/etc/rcS.conf
    1.22 -		if [ ! -f $1/etc/apache/conf.d/zerobin ]; then
    1.23 -			cat > $1/etc/apache/conf.d/zerobin <<EOT
    1.24 +	if [ -f "$1/etc/apache/httpd.conf" ]; then
    1.25 +		sed -i 's/lighttpd/apache/' "$1/etc/rcS.conf"
    1.26 +		if [ ! -f "$1/etc/apache/conf.d/zerobin" ]; then
    1.27 +			cat > "$1/etc/apache/conf.d/zerobin" <<EOT
    1.28  <IfModule mod_alias.c>
    1.29      Alias /paste /usr/share/zerobin/
    1.30  </IfModule>