Subversion Repositories ALCASAR

Rev

Rev 318 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 318 Rev 615
Line 4... Line 4...
4
*	CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION			*
4
*	CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION			*
5
*********************************************************************/
5
*********************************************************************/
6
 
6
 
7
define ("ALCASAR_RADIUS_SITE", "/etc/raddb/sites-available/alcasar");
7
define ("ALCASAR_RADIUS_SITE", "/etc/raddb/sites-available/alcasar");
8
define ("ALCASAR_RADIUS_MODULE_LDAP", "/etc/raddb/modules/ldap");
8
define ("ALCASAR_RADIUS_MODULE_LDAP", "/etc/raddb/modules/ldap");
-
 
9
define ("ALCASAR_CONF_FILE", "/usr/local/etc/alcasar.conf");
9
 
10
 
10
/********************************************************************
11
/********************************************************************
11
*						FONCTION ERREUR								*
12
*						FONCTION ERREUR								*
12
*********************************************************************/
13
*********************************************************************/
13
 
14
 
Line 223... Line 224...
223
fwrite($ouvre, $fichier);
224
fwrite($ouvre, $fichier);
224
fclose($ouvre);
225
fclose($ouvre);
225
 
226
 
226
}	//test $auth_enable
227
}	//test $auth_enable
227
 
228
 
228
/********************************************************************
229
/****************************************************************
229
*					Redémarage du service radius					*
230
*		Redémarage des service				*
230
*********************************************************************/
231
*****************************************************************/
231
 
232
 
-
 
233
if ($auth_enable == "1"){
-
 
234
	file_put_contents(ALCASAR_CONF_FILE, str_replace('LDAP=off', 'LDAP=on', file_get_contents(ALCASAR_CONF_FILE)));}
-
 
235
else {
-
 
236
	file_put_contents(ALCASAR_CONF_FILE, str_replace('LDAP=on', 'LDAP=off', file_get_contents(ALCASAR_CONF_FILE)));}
-
 
237
exec ("sudo /usr/local/bin/alcasar-iptables.sh");
232
exec ("sudo service radiusd restart");
238
exec ("sudo service radiusd restart");
233
 
239
 
234
/********************************************************************
240
/********************************************************************
235
*			Redirection vers la page de configuration LDAP			*
241
*			Redirection vers la page de configuration LDAP			*
236
*********************************************************************/
242
*********************************************************************/
237
 
243
 
238
header('Location:ldap.php?update=ok');
244
header('Location:ldap.php?update=ok');
239
exit();
245
exit();
240
?>
-
 
241
 
246
?>
-
 
247