Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 611 → Rev 612

/web/acc/admin/network.php
79,7 → 79,7
define ("ALCASAR_CHILLI", "/etc/chilli.conf");
define ("ALCASAR_ETH0", "/etc/sysconfig/network-scripts/default-ifcfg-eth0");
define ("ALCASAR_ETH1", "/etc/sysconfig/network-scripts/ifcfg-eth1");
define ("ALCASAR_NETWORK", "/usr/local/etc/alcasar-network");
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
/********************************************************************
* TEST DES FICHIERS DE CONFIGURATION *
*********************************************************************/
108,12 → 108,12
if ($service == "sshd"){
if ($action == "start"){
exec("sudo /sbin/chkconfig --add $service");
file_put_contents(ALCASAR_NETWORK, str_replace('SSH=off', 'SSH=on', file_get_contents(ALCASAR_NETWORK)));
file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
exec ("sudo /usr/local/bin/alcasar-iptables.sh");
}
if ($action == "stop"){
exec("sudo /sbin/chkconfig --del $service");
file_put_contents(ALCASAR_NETWORK, str_replace('SSH=on', 'SSH=off', file_get_contents(ALCASAR_NETWORK)));
file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
exec ("sudo /usr/local/bin/alcasar-iptables.sh");
}
}