wok-4.x rev 12197

apache: add default value for certificate
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 26 16:24:33 2012 +0200 (2012-03-26)
parents 0a6b5118575a
children 8f4b1a1a934d
files apache/receipt
line diff
     1.1 --- a/apache/receipt	Mon Mar 26 16:18:20 2012 +0200
     1.2 +++ b/apache/receipt	Mon Mar 26 16:24:33 2012 +0200
     1.3 @@ -64,6 +64,9 @@
     1.4  
     1.5  post_install()
     1.6  {
     1.7 +	local lang=$(. /etc/locale.conf 2>/dev/null; echo ${LANG#*_})
     1.8 +	local tz=$(cat /etc/TZ 2>/dev/null)
     1.9 +	local hostname=$(cat /etc/hostname 2>/dev/null)
    1.10  	echo "Processing post-install commands..."
    1.11  	# Just in case.
    1.12  	chown www.www $1/var/log/$PACKAGE
    1.13 @@ -72,10 +75,10 @@
    1.14  	[ -s $1/etc/ssl/apache/apache.pem ] ||
    1.15  	openssl req -new -x509 -keyout $1/etc/ssl/apache/apache.pem \
    1.16  		-out $1/etc/ssl/apache/apache.pem -days 3650 -nodes <<EOT
    1.17 -$(. /etc/locale.conf ; echo ${LANG#*_})
    1.18 -$(cat /etc/TZ)
    1.19 +${lang:-us}
    1.20 +${tz:-UTC}
    1.21  
    1.22 -$(cat /etc/hostname)
    1.23 +${hostname:-slitaz}
    1.24  
    1.25  
    1.26