2018-03-05 14:35:14 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
ENABLE=$(CreoleGet activerLemon 'non')
|
2019-08-30 17:22:02 +02:00
|
|
|
if [ "$(CreoleGet activer_nginx_web non)" = 'oui' ];then
|
|
|
|
SERVER=nginx
|
|
|
|
else
|
|
|
|
SERVER=apache2
|
|
|
|
fi
|
2018-03-05 14:35:14 +01:00
|
|
|
|
2019-08-30 17:22:02 +02:00
|
|
|
SERVICES="manager"
|
|
|
|
SERVICES="${SERVICES} handler"
|
|
|
|
SERVICES="${SERVICES} portal"
|
|
|
|
|
|
|
|
for SERVICE in ${SERVICES}
|
2018-03-05 14:35:14 +01:00
|
|
|
do
|
2019-08-30 17:22:02 +02:00
|
|
|
if [ -L /etc/nginx/sites-enabled/${SERVICE}-nginx.conf ];then
|
|
|
|
rm /etc/nginx/sites-enabled/${SERVICE}-nginx.conf
|
|
|
|
fi
|
2019-09-02 17:39:18 +02:00
|
|
|
if [ -L /etc/apache2/sites-enabled/${SERVICE}-apache2.conf ];then
|
|
|
|
a2dissite ${SERVICE}-apache2
|
2018-03-05 14:35:14 +01:00
|
|
|
fi
|
|
|
|
if [ "${ENABLE}" = 'oui' ];then
|
2019-08-30 17:22:02 +02:00
|
|
|
if [ "${SERVER}" = 'nginx' ];then
|
|
|
|
ln -s /etc/nginx/sites-available/${SERVICE}-nginx.conf /etc/nginx/sites-enabled/${SERVICE}-nginx.conf
|
|
|
|
elif [ "${SERVER}" = 'apache2' ];then
|
2019-09-02 17:39:18 +02:00
|
|
|
a2ensite ${SERVICE}-apache2.conf
|
2019-08-30 17:22:02 +02:00
|
|
|
fi
|
2018-03-05 14:35:14 +01:00
|
|
|
fi
|
2019-08-30 17:22:02 +02:00
|
|
|
done
|