Don't crash if LemonLDAP::NG is disabled

Ref: #30852
This commit is contained in:
Daniel Dehennin 2020-10-14 13:17:07 +02:00
parent 6be262c6fb
commit 04c73c223b
3 changed files with 18 additions and 18 deletions

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
if [ $(CreoleGet activerLemon) = "oui" ];then if [ $(CreoleGet activerLemon 'non') = 'oui' ]
then
. /usr/lib/eole/diagnose.sh . /usr/lib/eole/diagnose.sh
manager=$(CreoleGet managerWebName) manager=$(CreoleGet managerWebName)
portal=$(CreoleGet authWebName) portal=$(CreoleGet authWebName)

View File

@ -1,9 +1,6 @@
#!/bin/bash #!/bin/bash
[ "$(CreoleGet activerLemon non)" = 'oui' ] || exit 0
# Updating Configuration cache # Updating Configuration cache
/usr/share/lemonldap-ng/bin/lemonldap-ng-cli update-cache 2>&1
cmd="/usr/share/lemonldap-ng/bin/lemonldap-ng-cli update-cache"
opt="update-cache"
res=$(${cmd} ${opt} 2>&1)
exit ${?}

View File

@ -1,17 +1,19 @@
#!/bin/bash #!/bin/bash
ENABLE=$(CreoleGet activerLemon 'non') ENABLE=$(CreoleGet activerLemon 'non')
CONF_FILES="manager-nginx.conf" NGINX_ENABLE=$(CreoleGet activer_nginx_web 'non')
CONF_FILES="${CONF_FILES} handler-nginx.conf"
CONF_FILES="${CONF_FILES} portal-nginx.conf" CONF_FILES="manager-nginx.conf handler-nginx.conf portal-nginx.conf"
CONF_FILES="${CONF_FILES} test-nginx.conf"
for CONF_FILE in ${CONF_FILES} for CONF_FILE in ${CONF_FILES}
do do
if [ -L /etc/nginx/sites-enabled/${CONF_FILE} ];then if [ -e /etc/nginx/sites-enabled/${CONF_FILE} ]
rm /etc/nginx/sites-enabled/${CONF_FILE} then
fi rm /etc/nginx/sites-enabled/${CONF_FILE}
if [ "${ENABLE}" = 'oui' ];then fi
ln -s /etc/nginx/sites-available/${CONF_FILE} /etc/nginx/sites-enabled/${CONF_FILE}
fi if [ "${ENABLE}" = 'oui' -a "${NGINX_ENABLE}" = 'oui' ]
done then
ln -s /etc/nginx/sites-available/${CONF_FILE} /etc/nginx/sites-enabled/${CONF_FILE}
fi
done