コード例 #1
0
ファイル: create.php プロジェクト: hypervm-ng/hypervm-ng
function create_main()
{
    global $argc, $argv;
    global $gbl, $sgbl, $login, $ghtml;
    $opt = parse_opt($argv);
    if (file_exists('/usr/local/lxlabs/.git')) {
        $opt['development_found'] = '1';
    }
    lxfile_mkdir("{$sgbl->__path_program_etc}/conf");
    lxfile_mkdir("{$sgbl->__path_program_root}/pid");
    lxfile_mkdir("{$sgbl->__path_program_root}/log");
    lxfile_mkdir("{$sgbl->__path_httpd_root}");
    os_create_program_service();
    if (isset($opt['admin-password'])) {
        $admin_pass = $opt['admin-password'];
    } else {
        $admin_pass = '******';
    }
    if ($opt['install-type'] == 'master') {
        if (!isset($opt['development_found'])) {
            create_mysql_db('master', $opt, $admin_pass);
            create_database();
            create_general();
            add_admin($admin_pass);
            create_servername();
            lxshell_return("__path_php_path", "../bin/collectquota.php");
        } else {
            print "Development GIT version found. Skipping creation from scratch of HyperVM-NG.\n";
        }
        print "Updating the system. Will take a while\n";
        system("/usr/local/lxlabs/ext/php/php ../bin/common/updatecleanup-main.php --type=master");
    } else {
        if ($opt['install-type'] == 'slave') {
            if (!isset($opt['development_found'])) {
                init_slave($admin_pass);
            } else {
                print "Development GIT version found. Skipping creation from scratch of HyperVM-NG.\n";
            }
            print "Updating the system. Will take a while\n";
            system("/usr/local/lxlabs/ext/php/php ../bin/common/updatecleanup-main.php --type=slave");
        } else {
            print "Unknown Install type\n";
            flush();
        }
    }
    system("rm -f /etc/sysconfig/network-scripts/ifcfg-*-range*");
    //system("$sgbl->__path_php_path ../bin/misc/fixcentos5xen.php");
    //os_fix_some_permissions();
    system("cp ../sbin/lxxen ../sbin/lxopenvz /usr/bin");
    system("chmod 4755 /usr/bin/lxxen /usr/bin/lxopenvz");
    //os_set_iis_ftp_root_path();
}
コード例 #2
0
ファイル: demoinit.php プロジェクト: soar-team/kloxo
function install_main()
{
    global $gbl, $login, $ghtml;
    try {
        initProgram("admin");
        ob_end_flush();
        create_servername();
        add_client_template();
        add_customer_reseller();
        add_domain_list();
        $login->was();
    } catch (Exception $e) {
        print $e->getMessage();
        print "\\n\n\n\n\n\n\n\n\n\nn\n";
    }
    print "\n";
}
コード例 #3
0
ファイル: init.php プロジェクト: soar-team/kloxo
function init_main($admin_pass)
{
    global $gbl, $sgbl, $login, $ghtml;
    try {
        add_admin($admin_pass);
        initProgram("admin");
        create_servername();
        //create_default_template();
        $login->was();
        createDnsTemplate();
        Ticket::createWelcomeTicket();
        /*
        	if (lxfile_exists("__path_program_etc/license.txt")) {
        		decodeAndStoreLicense();
        		$login->license_o->write();
        		$login->write();
        	}
        */
    } catch (Exception $e) {
        print $e->getMessage();
        print "\\n\n\n\n\n\n\n\n\n\nn\n";
    }
    print "\n";
}