exit; } if (isset($_GET["vps-restart"])) { vps_restart(); exit; } if (isset($_GET["vps-stop"])) { vps_stop(); exit; } if (isset($_GET["vps-start"])) { vps_start(); exit; } if (isset($_GET["vps-running"])) { vps_running(); exit; } if (isset($_GET["lxc-events"])) { lxc_events(); exit; } if (isset($_GET["vps-reconfig"])) { lxc_reconfig(); exit; } if (isset($_GET["lxc-templates"])) { lxc_templates(); exit; } if (isset($_GET["artica-make"])) {
function vps_restart($ID) { if (!isset($GLOBALS["CLASS_UNIX"])) { $GLOBALS["CLASS_UNIX"] = new unix(); } if (!vps_running($ID)) { vps_start($ID); return; } $workingdirectory = root_directory($ID); echo2("Starting......: VPS server: vps-{$ID}: restarting"); $lxcrestart = $GLOBALS["CLASS_UNIX"]->find_program("lxc-restart"); exec("{$lxcrestart} -n vps-{$ID} -d {$workingdirectory} -o {$workingdirectory}/start.log 2>&1", $results); while (list($index, $line) = each($results)) { echo2("Starting......: VPS server: {$line}"); } }