Exemple #1
0
if ($Apache_port == $Apache_ssl_port or $MySQL_port == $Apache_port or $MySQL_port == $Apache_ssl_port) {
    print "\n NOTE: All ports must be unique rerun this script again\n\n";
    exit;
}
$Apache_name = prompt_user(" Current Apache name = {$Apache_name_old} Proposed name ", $Apache_name);
$MySQL_name = prompt_user(" Current MySQL name  = {$MySQL_name_old}  Proposed name ", $MySQL_name);
print "\n ===== SERVICES Service names ==== \n\n";
$Apache_service_name = prompt_user(" Current Apache name = {$Apache_service_name_old} Proposed name = ", "{$Apache_service_name}");
$MySQL_service_name = prompt_user(" Current MySQL  name = {$MySQL_service_name_old}  Proposed name = ", "{$MySQL_service_name}");
print "\n\n ===== UniTray Controller  ==== \n";
$UniTray_name = prompt_user(" Current UniTray name = {$UniTray_name_old} Proposed name ", $UniTray_name);
print "\n\n ===== eAccelerator  ==== \n";
print "\n If running a single server do not disable eAccelerator.\n For multi-servers enter Y \n\n";
$Disable_eAccelerator = prompt_user(" Disable_eAccelerator type Y or N ", "Y");
print "\n";
$commit = prompt_user(" Commit type Y or N ", "Y");
if ($commit != "Y") {
    print "\n No action taken\n\n";
    exit;
}
//=============== UPDATE UniTray ==========================
if (unitray_running()) {
    // Is Unitray running
    stop_unitray();
    // yes: kill it
    $unitray_was_running = true;
    // set tacker
} else {
    // no:
    $unitray_was_running = false;
    // reset tacker
Exemple #2
0
print " #    If you do not have a domain name use the default by pressing eneter.    #\n";
print " #                                                                            #\n";
print " # 2) To change any of the three defaults edit file:                          #\n";
print " #    unicon/key_cert_gen/ssl_gen.pl                                          #\n";
print " #    search for the edit section and replace accordingly.                    #\n";
print " #                                                                            #\n";
print " #----------------------------------------------------------------------------#\n\n";
chdir('./gen');
// Set new working folder
$_ENV['OPENSSL_CONF'] = 'openssl.cnf';
// Set environment variable
// Get user input
//********* Edit defaults *****************************************************
$str1 =& prompt_user("  CN Common Name. Your full domain name ", "localhost");
$str2 =& prompt_user("  OU Organization Unit (eg, section)  ", "Secure demo");
$str3 =& prompt_user("  O  Organization Name (eg, company)    ", "UniServer");
print "\n ";
//********* Do not Edit below this line ***************************************
//== Create a private key and signing request
// Build string
$str4 = "/O=" . $str3 . "/OU=" . $str2 . "/CN=" . $str1;
// Create two parameters dummy used for checking second is used as is
$cmd = getcwd() . "\\ssl_gen.bat" . " dummy" . " \"" . $str4 . "\"";
exec($cmd);
print "Creating a private key and signing request\n\n";
//=== Copying new certificate and key to Server
print " #----------------------------------------------------------------------------#\n";
print " # Copying new certificate and key to Server                                  #\n";
print " # Location:                                                                  #\n";
print " #           Certificate:  usr/local/apache2/conf/ssl.crt/server.crt          #\n";
print " #           Key:          usr/local/apache2/conf/ssl.key/server.key          #\n";