wok diff phpldapadmin/receipt @ rev 22143
updated x11vnc (0.9.13 -> 0.9.16)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Nov 06 13:57:20 2019 +0100 (2019-11-06) |
parents | 97679aef4f16 |
children | d25f12337a71 |
line diff
1.1 --- a/phpldapadmin/receipt Wed Sep 16 16:35:28 2015 +0200 1.2 +++ b/phpldapadmin/receipt Wed Nov 06 13:57:20 2019 +0100 1.3 @@ -30,15 +30,15 @@ 1.4 1.5 post_install() 1.6 { 1.7 - if [ -s $1/etc/openldap/slapd.conf ]; then 1.8 - rootdn=$(awk '/^rootdn/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g') 1.9 - sed -i "s|'login','dn','');|'login','dn','');\\n\$ldapservers->SetValue(\$i,'login','dn','$rootdn');|" $1/etc/phpldapadmin/config.php 1.10 - chown 80.80 $1/etc/phpldapadmin/config.php 1.11 + if [ -s "$1/etc/openldap/slapd.conf" ]; then 1.12 + rootdn=$(awk '/^rootdn/ { print $2 }' < "$1/etc/openldap/slapd.conf" | sed 's/"//g') 1.13 + sed -i "s|'login','dn','');|'login','dn','');\\n\$ldapservers->SetValue(\$i,'login','dn','$rootdn');|" "$1/etc/phpldapadmin/config.php" 1.14 + chown 80.80 "$1/etc/phpldapadmin/config.php" 1.15 fi 1.16 # Configure lighttpd server 1.17 - if [ -f $1/etc/lighttpd/lighttpd.conf ]; then 1.18 - if ! grep -q /usr/share/phpldapadmin/ $1/etc/lighttpd/lighttpd.conf; then 1.19 - sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpldapadmin/" => "/usr/share/phpldapadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf 1.20 + if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then 1.21 + if ! grep -q /usr/share/phpldapadmin/ "$1/etc/lighttpd/lighttpd.conf"; then 1.22 + sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpldapadmin/" => "/usr/share/phpldapadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf" 1.23 if [ -z "$1" ]; then 1.24 # Start Web server. 1.25 /etc/init.d/lighttpd stop 1.26 @@ -47,9 +47,9 @@ 1.27 fi 1.28 fi 1.29 # Configure apache server 1.30 - if [ -f $1/etc/apache/httpd.conf ]; then 1.31 - if [ ! -f $1/etc/apache/conf.d/phpldapadmin ]; then 1.32 - cat > $1/etc/apache/conf.d/phpldapadmin <<EOT 1.33 + if [ -f "$1/etc/apache/httpd.conf" ]; then 1.34 + if [ ! -f "$1/etc/apache/conf.d/phpldapadmin" ]; then 1.35 + cat > "$1/etc/apache/conf.d/phpldapadmin" <<EOT 1.36 <IfModule mod_alias.c> 1.37 Alias /phpldapadmin /usr/share/phpldapadmin 1.38 </IfModule> 1.39 @@ -71,8 +71,8 @@ 1.40 cat <<EOT 1.41 ------ 1.42 Login DN and password are found in /etc/openldap/slapd.conf with rootdn and rootpw keywords: 1.43 -$(grep ^rootdn $1/etc/openldap/slapd.conf) 1.44 -$(grep ^rootpw $1/etc/openldap/slapd.conf) 1.45 +$(grep ^rootdn "$1/etc/openldap/slapd.conf") 1.46 +$(grep ^rootpw "$1/etc/openldap/slapd.conf") 1.47 ------ 1.48 EOT 1.49 }