| Line 102... |
Line 102... |
| 102 |
|
102 |
|
| 103 |
//-------------------------------
|
103 |
//-------------------------------
|
| 104 |
// Les actions sur un service
|
104 |
// Les actions sur un service
|
| 105 |
//-------------------------------
|
105 |
//-------------------------------
|
| 106 |
//sécurité sur les actions à réaliser
|
106 |
//sécurité sur les actions à réaliser
|
| 107 |
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","named","sshd");
|
107 |
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","named","dhcpd","httpd","sshd");
|
| 108 |
$autorizeAction = array("start","stop","restart");
|
108 |
$autorizeAction = array("start","stop","restart");
|
| 109 |
|
109 |
|
| 110 |
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
|
110 |
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
|
| 111 |
if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
|
111 |
if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
|
| 112 |
$execStatus = serviceExec($_GET['service'], $_GET['action']);
|
112 |
$execStatus = serviceExec($_GET['service'], $_GET['action']);
|
| Line 121... |
Line 121... |
| 121 |
$serviceStatus['chilli'] = checkServiceStatus("chilli","pid");
|
121 |
$serviceStatus['chilli'] = checkServiceStatus("chilli","pid");
|
| 122 |
$serviceStatus['dansguardian'] = checkServiceStatus("dansguardian","pid");
|
122 |
$serviceStatus['dansguardian'] = checkServiceStatus("dansguardian","pid");
|
| 123 |
$serviceStatus['mysqld'] = checkServiceStatus("mysqld","OK");
|
123 |
$serviceStatus['mysqld'] = checkServiceStatus("mysqld","OK");
|
| 124 |
$serviceStatus['squid'] = checkServiceStatus("squid","pid");
|
124 |
$serviceStatus['squid'] = checkServiceStatus("squid","pid");
|
| 125 |
$serviceStatus['named'] = checkServiceStatus("named","up");
|
125 |
$serviceStatus['named'] = checkServiceStatus("named","up");
|
| - |
|
126 |
$serviceStatus['dhcpd'] = checkServiceStatus("dhcpd","pid");
|
| - |
|
127 |
$serviceStatus['httpd'] = checkServiceStatus("httpd","pid");
|
| 126 |
$serviceStatus['sshd'] = checkServiceStatus("sshd","pid");
|
128 |
$serviceStatus['sshd'] = checkServiceStatus("sshd","pid");
|
| 127 |
|
129 |
|
| 128 |
// Fonction de test de connectivité internet
|
130 |
// Fonction de test de connectivité internet
|
| 129 |
function internetTest(){
|
131 |
function internetTest(){
|
| 130 |
$host = "www.google.fr";
|
132 |
$host = "www.google.fr";
|