2018-03-05 14:35:14 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
ENABLE=$(CreoleGet activerLemon 'non')
|
2020-10-14 13:17:07 +02:00
|
|
|
NGINX_ENABLE=$(CreoleGet activer_nginx_web 'non')
|
|
|
|
|
|
|
|
CONF_FILES="manager-nginx.conf handler-nginx.conf portal-nginx.conf"
|
2018-03-05 14:35:14 +01:00
|
|
|
|
|
|
|
for CONF_FILE in ${CONF_FILES}
|
|
|
|
do
|
2020-10-14 13:17:07 +02:00
|
|
|
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
|