array ("get", "string", ''), "script" => array ("get", "boolean", 0), ); getFields($fields); if (in_array($action, array('start', 'stop', 'monit'))) { $res = $hooks->invoke($action, array(), 'lxc'); } $infos = $lxc->getvm(); if ($script) { if (isset($res)) { echo "ACTION:".$action."\n"; echo "RETURN:".intval($res['lxc'])."\n"; } if ($infos) { echo "VM_STATUS:OK\n"; echo "VM_START:".$infos['date_start']."\n"; echo "VM_RETURN_CODE:".intval($infos['serialized_object']['error'])."\n"; echo "VM_ID:".$infos['serialized_object']['vm']."\n"; echo "VM_HOSTNAME:".$infos['serialized_object']['hostname']."\n"; echo "VM_MSG:".$infos['serialized_object']['msg']."\n"; } else { echo "VM_STATUS:NONE\n"; } die(); } # Show the header after the "if script" ;) include_once("head.php"); ?>



errstr(); ?>


'; __("You can start a virtual machine."); echo ""._("Click here to do so.").""; echo ''; } else { echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"._("Hostname")."".$infos['serialized_object']['hostname']."
"._("Start time")."".$infos['date_start']."
"._("Usefull command")."
";
   echo "ssh ".$mem->user['login']."@".$infos['serialized_object']['hostname']."\n";
   echo "rsync ".$mem->user['login']."@".$infos['serialized_object']['hostname']."\n";
 echo "
"._("Click here to stop the machine")."
"; } // empty infos ?>



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' ?>