19
posttemplate/70-lemonldap-ng-nginx
Executable file
19
posttemplate/70-lemonldap-ng-nginx
Executable file
@ -0,0 +1,19 @@
|
||||
#!/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
|
Reference in New Issue
Block a user