1.1 --- a/conf/tools/configure.sh Sun Apr 17 18:59:06 2016 +0200
1.2 +++ b/conf/tools/configure.sh Sun Apr 17 19:25:39 2016 +0200
1.3 @@ -31,7 +31,7 @@
1.4
1.5 if [ ! -e "$CONF" ]; then
1.6 cat 1>&2 <<EOF
1.7 -The conf directory cannot be found.
1.8 +The $CONF directory cannot be found.
1.9 EOF
1.10 exit 1
1.11 fi
1.12 @@ -46,11 +46,24 @@
1.13 CONFDIR="$CONF/$COMPONENT"
1.14
1.15 for FILENAME in `find "$CONFDIR" -type f` ; do
1.16 - PARENT="$OUTDIR/"`dirname "$FILENAME"`
1.17 - if [ ! -e "$PARENT" ]; then
1.18 - mkdir -p "$PARENT"
1.19 + PARENTPATH="$OUTDIR/"`dirname "$FILENAME"`
1.20 +
1.21 + # Skip files not relevant for the chosen user database.
1.22 +
1.23 + PARENT=`basename "$PARENTPATH"`
1.24 + if ( [ "$USER_DATABASE" = 'Simple' ] && [ "$PARENT" = 'ldap' ] ) || \
1.25 + ( [ "$USER_DATABASE" = 'LDAP' ] && [ "$PARENT" = 'simple' ] ); then
1.26 + continue
1.27 + fi
1.28 +
1.29 + if [ ! -e "$PARENTPATH" ]; then
1.30 + mkdir -p "$PARENTPATH"
1.31 fi
1.32
1.33 envsubst "$SUBSTITUTED" < "$FILENAME" > "$OUTDIR/$FILENAME"
1.34 done
1.35 done
1.36 +
1.37 +# Copy other files.
1.38 +
1.39 +cp "$CONF/aliases.example" "$OUTDIR/$CONF/aliases"