Line 62... |
Line 62... |
62 |
/********************************************************
|
62 |
/********************************************************
|
63 |
* Conf file modification & ldap script call *
|
63 |
* Conf file modification & ldap script call *
|
64 |
*********************************************************/
|
64 |
*********************************************************/
|
65 |
// After testing serveur access
|
65 |
// After testing serveur access
|
66 |
if ($auth_enable == "1") {
|
66 |
if ($auth_enable == "1") {
|
67 |
exec("sed -i \"s/^LDAP=.*/LDAP=on/g\" ".ALCASAR_CONF_FILE);
|
67 |
exec('sed -i \'s/^LDAP=.*/LDAP=on/g\' '.ALCASAR_CONF_FILE);
|
68 |
exec("sed -i \"s/^LDAP_SERVER=.*/LDAP_SERVER=$ldap_server/g\" ".ALCASAR_CONF_FILE);
|
68 |
exec('sed -i '.escapeshellarg("s/^LDAP_SERVER=.*/LDAP_SERVER=$ldap_server/g").' '.ALCASAR_CONF_FILE);
|
69 |
exec("sed -i \"s/^LDAP_BASE=.*/LDAP_BASE=$ldap_base_dn/g\" ".ALCASAR_CONF_FILE);
|
69 |
exec('sed -i '.escapeshellarg("s/^LDAP_BASE=.*/LDAP_BASE=$ldap_base_dn/g").' '.ALCASAR_CONF_FILE);
|
70 |
exec("sed -i \"s/^LDAP_UID=.*/LDAP_UID=$ldap_filter/g\" ".ALCASAR_CONF_FILE);
|
70 |
exec('sed -i '.escapeshellarg("s/^LDAP_UID=.*/LDAP_UID=$ldap_filter/g").' '.ALCASAR_CONF_FILE);
|
71 |
exec("sed -i \"s/^LDAP_FILTER=.*/LDAP_FILTER=$ldap_filter/g\" ".ALCASAR_CONF_FILE);
|
71 |
exec('sed -i '.escapeshellarg("s/^LDAP_FILTER=.*/LDAP_FILTER=$ldap_filter/g").' '.ALCASAR_CONF_FILE);
|
72 |
exec("sed -i \"s/^LDAP_USER=.*/LDAP_USER=$ldap_user/g\" ".ALCASAR_CONF_FILE);
|
72 |
exec('sed -i '.escapeshellarg("s/^LDAP_USER=.*/LDAP_USER=$ldap_user/g").' '.ALCASAR_CONF_FILE);
|
73 |
exec("sed -i \"s/^LDAP_PASSWORD=.*/LDAP_PASSWORD=$ldap_password/g\" ".ALCASAR_CONF_FILE);
|
73 |
exec('sed -i '.escapeshellarg("s/^LDAP_PASSWORD=.*/LDAP_PASSWORD=$ldap_password/g").' '.ALCASAR_CONF_FILE);
|
74 |
exec("sudo /usr/local/bin/alcasar-ldap.sh -on");
|
74 |
exec('sudo /usr/local/bin/alcasar-ldap.sh -on');
|
75 |
}
|
75 |
}
|
76 |
else {
|
76 |
else {
|
77 |
exec("sed -i \"s/^LDAP=.*/LDAP=off/g\" ".ALCASAR_CONF_FILE);
|
77 |
exec('sed -i "s/^LDAP=.*/LDAP=off/g" '.ALCASAR_CONF_FILE);
|
78 |
exec("sudo /usr/local/bin/alcasar-ldap.sh -off");
|
78 |
exec('sudo /usr/local/bin/alcasar-ldap.sh -off');
|
79 |
}
|
79 |
}
|
80 |
|
80 |
|
81 |
/****************************************************************
|
81 |
/****************************************************************
|
82 |
* Redirection vers la page de configuration LDAP *
|
82 |
* Redirection vers la page de configuration LDAP *
|
83 |
*****************************************************************/
|
83 |
*****************************************************************/
|