Line 68... |
Line 68... |
68 |
|
68 |
|
69 |
/********************************************************************
|
69 |
/********************************************************************
|
70 |
* CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION *
|
70 |
* CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION *
|
71 |
*********************************************************************/
|
71 |
*********************************************************************/
|
72 |
|
72 |
|
73 |
define ("ALCASAR_CHILLI", "/etc/chilli/config");
|
73 |
define ("ALCASAR_CHILLI", "/etc/chilli.conf");
|
74 |
define ("ALCASAR_ETH0", "/etc/sysconfig/network-scripts/default-ifcfg-eth0");
|
74 |
define ("ALCASAR_ETH0", "/etc/sysconfig/network-scripts/default-ifcfg-eth0");
|
75 |
define ("ALCASAR_ETH1", "/etc/sysconfig/network-scripts/ifcfg-eth1");
|
75 |
define ("ALCASAR_ETH1", "/etc/sysconfig/network-scripts/ifcfg-eth1");
|
76 |
|
76 |
|
77 |
/********************************************************************
|
77 |
/********************************************************************
|
78 |
* TEST DES FICHIERS DE CONFIGURATION *
|
78 |
* TEST DES FICHIERS DE CONFIGURATION *
|
Line 83... |
Line 83... |
83 |
exit("Fichier de configuration ".ALCASAR_CHILLI." non présent");
|
83 |
exit("Fichier de configuration ".ALCASAR_CHILLI." non présent");
|
84 |
}
|
84 |
}
|
85 |
if (!file_exists(ALCASAR_ETH0)){
|
85 |
if (!file_exists(ALCASAR_ETH0)){
|
86 |
exit("Fichier de configuration ".ALCASAR_ETH0." non présent");
|
86 |
exit("Fichier de configuration ".ALCASAR_ETH0." non présent");
|
87 |
}
|
87 |
}
|
88 |
if (!file_exists(ALCASAR_ETH0)){
|
88 |
if (!file_exists(ALCASAR_ETH1)){
|
89 |
exit("Fichier de configuration ".ALCASAR_ETH1." non présent");
|
89 |
exit("Fichier de configuration ".ALCASAR_ETH1." non présent");
|
90 |
}
|
90 |
}
|
91 |
if (!is_readable(ALCASAR_ETH0)){
|
91 |
if (!is_readable(ALCASAR_ETH0)){
|
92 |
exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH0);
|
92 |
exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH0);
|
93 |
}
|
93 |
}
|
94 |
if (!is_readable(ALCASAR_ETH0)){
|
94 |
if (!is_readable(ALCASAR_ETH1)){
|
95 |
exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH1);
|
95 |
exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH1);
|
96 |
}
|
96 |
}
|
97 |
|
97 |
|
98 |
//fonction pour faire une action (start,stop,restart) sur un service
|
98 |
//fonction pour faire une action (start,stop,restart) sur un service
|
99 |
function serviceExec($service, $action){
|
99 |
function serviceExec($service, $action){
|