Line 19... |
Line 19... |
19 |
$l_service_action = "Actions";
|
19 |
$l_service_action = "Actions";
|
20 |
$l_radiusd = "Serveur d'authentification et d'autorisation";
|
20 |
$l_radiusd = "Serveur d'authentification et d'autorisation";
|
21 |
$l_chilli = "Passerelle d'interception";
|
21 |
$l_chilli = "Passerelle d'interception";
|
22 |
$l_dansguardian = "Filtre d'URL et de contenu WEB";
|
22 |
$l_dansguardian = "Filtre d'URL et de contenu WEB";
|
23 |
$l_mysqld = "Serveur de la base de données usager";
|
23 |
$l_mysqld = "Serveur de la base de données usager";
|
24 |
$l_squid = "Serveur de cache WEB";
|
- |
|
25 |
$l_dnsmasq = "Serveur DNS et filtre de domaine";
|
- |
|
26 |
$l_httpd = "Serveur WEB (Centre de Gestion d'ALCASAR)";
|
24 |
$l_httpd = "Serveur WEB (Centre de Gestion d'ALCASAR)";
|
27 |
$l_havp = "Filtre antivirus WEB";
|
- |
|
28 |
$l_sshd = "Accès sécurisée à distance";
|
25 |
$l_sshd = "Accès sécurisée à distance";
|
29 |
$l_freshclam = "Mise à jour de l'antivirus toutes les 2 heures";
|
26 |
$l_freshclam = "Mise à jour de l'antivirus toutes les 2 heures";
|
30 |
$l_ntpd = "Service de mise à l'heure réseau";
|
27 |
$l_ntpd = "Service de mise à l'heure réseau";
|
- |
|
28 |
$l_havp = "Proxy Antivirus 1";
|
- |
|
29 |
$l_havp2 = "Proxy Antivirus 2";
|
- |
|
30 |
$l_dnsmasq = "Serveur DHCP et de cache DNS";
|
- |
|
31 |
$l_dnsmasq_blacklist = "Serveur DHCP et de cache DNS pour la Blacklist";
|
- |
|
32 |
$l_dnsmasq_whitelist = "Serveur DHCP et de cache DNS pour la Whitelist";
|
31 |
} else {
|
33 |
} else {
|
32 |
$l_services_title = "Services configuration";
|
34 |
$l_services_title = "Services configuration";
|
33 |
$l_main_services = "Main services";
|
35 |
$l_main_services = "Main services";
|
34 |
$l_opt_services = "Optional services";
|
36 |
$l_opt_services = "Optional services";
|
35 |
$l_service_title = "Service name";
|
37 |
$l_service_title = "Service name";
|
Line 42... |
Line 44... |
42 |
$l_service_action = "Actions";
|
44 |
$l_service_action = "Actions";
|
43 |
$l_radiusd = "Authentication and authorisation serveur";
|
45 |
$l_radiusd = "Authentication and authorisation serveur";
|
44 |
$l_chilli = "Interception gateway";
|
46 |
$l_chilli = "Interception gateway";
|
45 |
$l_dansguardian = "URL and WEB content filter";
|
47 |
$l_dansguardian = "URL and WEB content filter";
|
46 |
$l_mysqld = "User database server";
|
48 |
$l_mysqld = "User database server";
|
47 |
$l_squid = "Proxy Cache WEB";
|
- |
|
48 |
$l_dnsmasq = "DNS and domain name filter";
|
- |
|
49 |
$l_httpd = "WEB server (ALCASAR Control Center)";
|
49 |
$l_httpd = "WEB server (ALCASAR Control Center)";
|
50 |
$l_havp = "WEB antivirus filter";
|
- |
|
51 |
$l_sshd = "Secure remote access";
|
50 |
$l_sshd = "Secure remote access";
|
52 |
$l_freshclam = "WEB antivirus update (every 2 hours)";
|
51 |
$l_freshclam = "WEB antivirus update (every 2 hours)";
|
53 |
$l_ntpd = "Network time";
|
52 |
$l_ntpd = "Network time";
|
- |
|
53 |
$l_havp = "Antivirus Proxy 1";
|
- |
|
54 |
$l_havp2 = "Antivirus Proxy 2";
|
- |
|
55 |
$l_dnsmasq = "A lightweight DHCP and caching DNS server";
|
- |
|
56 |
$l_dnsmasq_blacklist = "A lightweight DHCP and caching DNS server for the Blacklist";
|
- |
|
57 |
$l_dnsmasq_whitelist = "A lightweight DHCP and caching DNS server for the Whitelist";
|
54 |
}
|
58 |
}
|
55 |
|
59 |
|
56 |
/****************************************************************
|
60 |
/****************************************************************
|
57 |
* CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION *
|
61 |
* CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION *
|
58 |
*****************************************************************/
|
62 |
*****************************************************************/
|
Line 106... |
Line 110... |
106 |
|
110 |
|
107 |
//-------------------------------
|
111 |
//-------------------------------
|
108 |
// Les actions sur un service
|
112 |
// Les actions sur un service
|
109 |
//-------------------------------
|
113 |
//-------------------------------
|
110 |
//sécurité sur les actions à réaliser
|
114 |
//sécurité sur les actions à réaliser
|
111 |
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","dnsmasq","httpd","havp","sshd","freshclam","ntpd");
|
115 |
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","httpd","sshd","freshclam","ntpd","havp","havp2","dnsmasq","dnsmasq-blacklist","dnsmasq-whitelist");
|
112 |
$autorizeAction = array("start","stop","restart");
|
116 |
$autorizeAction = array("start","stop","restart");
|
113 |
|
117 |
|
114 |
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
|
118 |
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
|
115 |
if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
|
119 |
if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
|
116 |
$execStatus = serviceExec($_GET['service'], $_GET['action']);
|
120 |
$execStatus = serviceExec($_GET['service'], $_GET['action']);
|
Line 123... |
Line 127... |
123 |
$MainServiceStatus = array();
|
127 |
$MainServiceStatus = array();
|
124 |
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd");
|
128 |
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd");
|
125 |
$MainServiceStatus['chilli'] = checkServiceStatus("chilli");
|
129 |
$MainServiceStatus['chilli'] = checkServiceStatus("chilli");
|
126 |
$MainServiceStatus['dansguardian'] = checkServiceStatus("dansguardian");
|
130 |
$MainServiceStatus['dansguardian'] = checkServiceStatus("dansguardian");
|
127 |
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld");
|
131 |
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld");
|
128 |
$MainServiceStatus['squid'] = checkServiceStatus("squid");
|
- |
|
129 |
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq");
|
- |
|
130 |
$MainServiceStatus['httpd'] = checkServiceStatus("httpd");
|
132 |
$MainServiceStatus['httpd'] = checkServiceStatus("httpd");
|
131 |
$MainServiceStatus['havp'] = checkServiceStatus("havp");
|
133 |
$MainServiceStatus['havp'] = checkServiceStatus("havp");
|
- |
|
134 |
$MainServiceStatus['havp2'] = checkServiceStatus("havp2");
|
- |
|
135 |
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq");
|
- |
|
136 |
$MainServiceStatus['dnsmasq_blacklist'] = checkServiceStatus("dnsmasq-blacklist");
|
- |
|
137 |
$MainServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist");
|
132 |
|
138 |
|
133 |
$OptServiceStatus = array();
|
139 |
$OptServiceStatus = array();
|
134 |
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
|
140 |
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
|
135 |
$OptServiceStatus['freshclam'] = checkServiceStatus("freshclam");
|
141 |
$OptServiceStatus['freshclam'] = checkServiceStatus("freshclam");
|
136 |
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
|
142 |
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
|
Line 158... |
Line 164... |
158 |
<tr>
|
164 |
<tr>
|
159 |
<?php if ($statusOK) { ?>
|
165 |
<?php if ($statusOK) { ?>
|
160 |
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
|
166 |
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
|
161 |
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
|
167 |
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
|
162 |
<td width="80" align="center">---</td>
|
168 |
<td width="80" align="center">---</td>
|
163 |
<td width="80" align="center"><?php if ($serviceName != "chilli") { echo "<a href=".$_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop</a>"; } else echo "---";?></td>
|
169 |
<td width="80" align="center"><?php if ($serviceName != "chilli" && $serviceName != "havp" && $serviceName != "havp2" && $serviceName != "dnsmasq" && $serviceName != "dnsmasq_blacklist" && $serviceName != "dnsmasq_whitelist") { echo "<a href=".$_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop</a>"; } else echo "---";?></td>
|
164 |
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
|
170 |
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
|
165 |
<?php } else { ?>
|
171 |
<?php } else { ?>
|
166 |
<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
|
172 |
<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
|
167 |
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
|
173 |
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
|
168 |
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
|
174 |
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
|