__netbox: no ldap config if no ldap parameters
The ldap config file will be empty (only comments) if no parameter name set matches `^ldap-*`. It still generate a ldap config if one or more ldap parameters are set, but not all basic parameters.
This commit is contained in:
parent
e47cead637
commit
0281b2c804
1 changed files with 14 additions and 0 deletions
|
@ -1,5 +1,19 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# no configuration if there are no ldap parameters
|
||||||
|
if ls -1qA "$__object/parameter"/ldap-* | grep -q .; then
|
||||||
|
# skip
|
||||||
|
cat << EOF
|
||||||
|
##############################
|
||||||
|
# LDAP-backed authentication #
|
||||||
|
##############################
|
||||||
|
|
||||||
|
# no options set
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
##############################
|
##############################
|
||||||
# LDAP-backed authentication #
|
# LDAP-backed authentication #
|
||||||
|
|
Loading…
Reference in a new issue