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"); ?>
"._("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")." |