wok diff nginx/receipt @ rev 18854

Link octave to gnuplot
author Lucas Levrel <llevrel@yahoo.fr>
date Mon Jan 25 22:26:55 2016 +0100 (2016-01-25)
parents 9e01bc6321ea
children 3630f18392bd
line diff
     1.1 --- a/nginx/receipt	Sun Dec 20 15:13:45 2015 +0100
     1.2 +++ b/nginx/receipt	Mon Jan 25 22:26:55 2016 +0100
     1.3 @@ -19,8 +19,6 @@
     1.4  # Rules to configure and make the package.
     1.5  compile_rules()
     1.6  {
     1.7 -	cd $src
     1.8 -
     1.9  #  --with-rtsig_module                enable rtsig module
    1.10  #  --with-select_module               enable select module
    1.11  #  --with-poll_module                 enable poll module
    1.12 @@ -59,39 +57,38 @@
    1.13  # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
    1.14  genpkg_rules()
    1.15  {
    1.16 -        cp -a $install/* $fs/
    1.17 -        rm -rf $fs/usr/html
    1.18 -        cp -a stuff/* $fs
    1.19 -        sed -i 's/#user  nobody;/user  www;/' $fs/etc/nginx/nginx.conf
    1.20 +	cp -a $install/* $fs/
    1.21 +	rm -rf $fs/usr/html
    1.22 +	cp -a stuff/* $fs
    1.23 +	sed -i 's/#user  nobody;/user  www;/' $fs/etc/nginx/nginx.conf
    1.24  }
    1.25  
    1.26  # Pre and post install commands for Tazpkg.
    1.27  # We stop the server by default in case of upgarde.
    1.28  pre_install()
    1.29  {
    1.30 -        echo "Processing pre-install commands..."
    1.31 -        [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
    1.32 -        # Backup config file.
    1.33 -        if [ -d "$1/$CONFIG_FILES" ]; then
    1.34 +	[ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
    1.35 +	# Backup config file.
    1.36 +	if [ -d "$1/$CONFIG_FILES" ]; then
    1.37  		cp -a "$1/$CONFIG_FILES" "$1/$CONFIG_FILES.bak"
    1.38 -        fi
    1.39 +	fi
    1.40  }
    1.41 +
    1.42  post_install()
    1.43  {
    1.44 -        echo "Processing post-install commands..."
    1.45 -        mkdir -p /var/spool/nginx
    1.46 -        # Restore original config.
    1.47 -        if [ -d "$1/$CONFIG_FILES.bak" ]; then
    1.48 +	mkdir -p /var/spool/nginx
    1.49 +	# Restore original config.
    1.50 +	if [ -d "$1/$CONFIG_FILES.bak" ]; then
    1.51  		rm -rf "$1/$CONFIG_FILES"
    1.52  		mv "$1/$CONFIG_FILES.bak" "$1/$CONFIG_FILES"
    1.53 -        fi
    1.54 -        # Just in case.
    1.55 -        chown www.www "$1/var/log/$PACKAGE"
    1.56 -        if [ -z "$1" ]; then
    1.57 +	fi
    1.58 +	# Just in case.
    1.59 +	chown www.www "$1/var/log/$PACKAGE"
    1.60 +	if [ -z "$1" ]; then
    1.61  		for i in apache lighttpd ; do
    1.62  			[ -f /etc/init.d/$i ] && /etc/init.d/$i stop
    1.63  		done
    1.64  		/etc/init.d/$PACKAGE start
    1.65 -        fi
    1.66 -        true
    1.67 +	fi
    1.68 +	true
    1.69  }