eole-lemonldap/posttemplate/70-lemonldap-ng-nginx
Daniel Dehennin dec2cb8e79 Harmonize script names
Ref: #30852
2020-10-14 13:18:54 +02:00

20 lines
498 B
Bash
Executable File

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