wok-current diff nginx/receipt @ rev 14890

Up: python-html5lib (0.95)
author Claudinei Pereira <claudinei@slitaz.org>
date Wed Jul 24 19:03:10 2013 -0300 (2013-07-24)
parents bc2cb6189827
children 92c944abb6f5
line diff
     1.1 --- a/nginx/receipt	Wed May 25 10:38:55 2011 +0200
     1.2 +++ b/nginx/receipt	Wed Jul 24 19:03:10 2013 -0300
     1.3 @@ -56,36 +56,38 @@
     1.4  # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
     1.5  genpkg_rules()
     1.6  {
     1.7 -	cp -a $_pkg/* $fs/
     1.8 -	rm -rf $fs/usr/html
     1.9 -	cp -a stuff/* $fs
    1.10 +        cp -a $_pkg/* $fs/
    1.11 +        rm -rf $fs/usr/html
    1.12 +        cp -a stuff/* $fs
    1.13 +        sed -i 's/#user  nobody;/user  www;/' $fs/etc/nginx/nginx.conf
    1.14  }
    1.15  
    1.16  # Pre and post install commands for Tazpkg.
    1.17  # We stop the server by default in case of upgarde.
    1.18  pre_install()
    1.19  {
    1.20 -	echo "Processing pre-install commands..."
    1.21 -	[ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
    1.22 -	# Backup config file.
    1.23 -	if [ -d $1/$CONFIG_FILES ]; then
    1.24 +        echo "Processing pre-install commands..."
    1.25 +        [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
    1.26 +        # Backup config file.
    1.27 +        if [ -d $1/$CONFIG_FILES ]; then
    1.28  		cp -a $1/$CONFIG_FILES $1/$CONFIG_FILES.bak
    1.29 -	fi
    1.30 +        fi
    1.31  }
    1.32  post_install()
    1.33  {
    1.34 -	echo "Processing post-install commands..."
    1.35 -	# Restore original config.
    1.36 -	if [ -d $1/$CONFIG_FILES.bak ]; then
    1.37 +        echo "Processing post-install commands..."
    1.38 +        mkdir -p /var/spool/nginx
    1.39 +        # Restore original config.
    1.40 +        if [ -d $1/$CONFIG_FILES.bak ]; then
    1.41  		rm -rf $1/$CONFIG_FILES
    1.42  		mv $1/$CONFIG_FILES.bak $1/$CONFIG_FILES
    1.43 -	fi
    1.44 -	# Just in case.
    1.45 -	chown www.www $1/var/log/$PACKAGE
    1.46 -	if [ -z "$1" ]; then
    1.47 +        fi
    1.48 +        # Just in case.
    1.49 +        chown www.www $1/var/log/$PACKAGE
    1.50 +        if [ -z "$1" ]; then
    1.51  		for i in apache lighttpd ; do
    1.52  			[ -f /etc/init.d/$i ] && /etc/init.d/$i stop
    1.53  		done
    1.54  		/etc/init.d/$PACKAGE start
    1.55 -	fi
    1.56 +        fi
    1.57  }