Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 426 → Rev 434

/web/acc/admin/network.php
105,6 → 105,10
function serviceExec($service, $action){
if (($action == "start")||($action == "stop")||($action == "restart")){
exec("sudo /sbin/service $service $action",$retval, $retstatus);
if ($service == "sshd"){
if ($action == "start"){ exec("sudo /sbin/chkconfig --add $service");}
if ($action == "stop"){ exec("sudo /sbin/chkconfig --del $service");}
}
return $retstatus;
} else {
return false;