Line 125... |
Line 125... |
125 |
* Redémarage des service *
|
125 |
* Redémarage des service *
|
126 |
*********************************************************/
|
126 |
*********************************************************/
|
127 |
|
127 |
|
128 |
if ($auth_enable == "1"){
|
128 |
if ($auth_enable == "1"){
|
129 |
file_put_contents(ALCASAR_CONF_FILE, str_replace('LDAP=off', 'LDAP=on', file_get_contents(ALCASAR_CONF_FILE)));
|
129 |
file_put_contents(ALCASAR_CONF_FILE, str_replace('LDAP=off', 'LDAP=on', file_get_contents(ALCASAR_CONF_FILE)));
|
130 |
exec("sed -i \"s/^LDAP_IP=.*/LDAP_IP=$ldap_server/g\" ALCASAR_CONF_FILE");}
|
130 |
exec("sudo sed -i \"s/^LDAP_IP=.*/LDAP_IP=$ldap_server/g\" ALCASAR_CONF_FILE");}
|
131 |
else {
|
131 |
else {
|
132 |
file_put_contents(ALCASAR_CONF_FILE, str_replace('LDAP=on', 'LDAP=off', file_get_contents(ALCASAR_CONF_FILE)));
|
132 |
file_put_contents(ALCASAR_CONF_FILE, str_replace('LDAP=on', 'LDAP=off', file_get_contents(ALCASAR_CONF_FILE)));
|
133 |
exec("sed -i \"s/^LDAP_IP=.*/LDAP_IP=0.0.0.0/g\" ALCASAR_CONF_FILE");}
|
133 |
exec("sudo sed -i \"s/^LDAP_IP=.*/LDAP_IP=0.0.0.0/g\" ALCASAR_CONF_FILE");}
|
134 |
exec ("sudo /usr/local/bin/alcasar-iptables.sh");
|
134 |
exec ("sudo /usr/local/bin/alcasar-iptables.sh");
|
135 |
exec ("sudo /usr/bin/systemctl restart radiusd");
|
135 |
exec ("sudo /usr/bin/systemctl restart radiusd");
|
136 |
|
136 |
|
137 |
/****************************************************************
|
137 |
/****************************************************************
|
138 |
* Redirection vers la page de configuration LDAP *
|
138 |
* Redirection vers la page de configuration LDAP *
|