array ("request", "string", ''), "script" => array ("request", "boolean", 0), ); getFields($fields); if (in_array($action, array('start', 'stop', 'monit'))) { $res = $hooks->invoke($action, array(), 'lxc'); } switch ($action) { case "start": $lxc->start(); break; case "stop": $lxc->stop(); break; } if ($lxc->error && !$script) { $error=$lxc->error; } $infos = $lxc->getvm(); if ($script) { header("Content-Type: text/plain"); if (isset($res)) { echo "ACTION:".$action."\n"; echo "RETURN:".intval($res['lxc'])."\n"; } if ($infos) { echo "VM_STATUS:OK\n"; echo "VM_START:".$infos['starttime']."\n"; echo "VM_HOSTNAME:".$infos['hostname']."\n"; } else { echo "VM_STATUS:NONE\n"; } die(); } # Show the header after the "if script" ;) include_once("head.php"); ?>




" />
"; echo ""._("Hostname")."".$infos['hostname'].""; echo ""._("Start time")."".date('Y-m-d H:i:s',$infos['starttime']).""; echo ""._("SSH Fingerprint")."".implode('
',$infos['ssh-keys']).""; echo ""._("Useful command")."
";
   echo "ssh ".$mem->user['login']."@".$infos['hostname']."\n";
   echo "rsync ".$mem->user['login']."@".$infos['hostname']."\n";
 echo "
"; echo ""; ?>

" />



http://user['login'].':ALTERNC_PASSWORD@'.$host.'/vm.php?http_auth=1&script=1&action=start' ?>
http://user['login'].':ALTERNC_PASSWORD@'.$host.'/vm.php?http_auth=1&script=1&action=stop' ?>
http://user['login'].':ALTERNC_PASSWORD@'.$host.'/vm.php?http_auth=1&script=1' ?>