Exemplo n.º 1
0
        // not a service
        print " Apache currently running as a standard program.\n";
        // inform user
    }
    if (apache_running() && get_apache_tracker() == 'service') {
        // Server running as a service
        echo " Stopping {$us_apache_service_name} Service ...\n";
        // Inform user
        stop_apache_service();
        echo " UnInstalling Apache Service {$us_apache_service_name} ...\n";
        // Inform user
        uninstall_apache_service();
        // And set tracker to free
        $no_apache_service = false;
    }
    if (!apache_running() && get_apache_tracker() == 'service') {
        // Server running as a service
        echo " Apache service {$us_apache_service_name} was not running\n";
        // Inform user
        echo " UnInstalling Apache Service {$us_apache_service_name} ...\n";
        uninstall_apache_service();
        // And set tracker to free
        $no_apache_service = false;
    }
    if ($no_apache_service) {
        print " Apache is not installed as a service\n";
    }
} else {
    //User has not enabled this in config.inc.php
    print " Apache service not enabled in config.inc.php\n";
}
Exemplo n.º 2
0
if (apache_running() && get_apache_tracker() != "free" && ssl_enabled()) {
    print "   Apache SSL port = " . get_apache_ssl_port() . " In use by this server\n";
}
if (!apache_running() && get_apache_tracker() != "free" && ssl_enabled()) {
    print "   Apache SSL port = " . get_apache_ssl_port() . " Undefined!\n";
}
if (!apache_running() && get_apache_tracker() != "free" && !ssl_enabled()) {
    print "   Apache SSL port = " . get_apache_ssl_port() . " Undefined!\n";
}
if (apache_running() && get_apache_tracker() != "free" && !ssl_enabled()) {
    print "   Apache SSL port = " . get_apache_ssl_port() . " SSL Not enabled free to use\n";
}
if (port_in_use(get_apache_ssl_port()) && get_apache_tracker() == "free") {
    print "   Apache SSL port = " . get_apache_ssl_port() . " In use by another program.\n";
}
if (!port_in_use(get_apache_ssl_port()) && get_apache_tracker() == "free") {
    print "   Apache SSL port = " . get_apache_ssl_port() . " Is free to use\n";
}
//=== MySQL port
if (mysql_running() && get_mysql_tracker() != "free") {
    print "   MySQL port      = " . get_mysql_port() . " In use by this server\n";
}
if (!mysql_running() && get_mysql_tracker() != "free") {
    print "   MySQL port      = " . get_mysql_port() . " Undefined!\n";
}
if (port_in_use(get_mysql_port()) && get_mysql_tracker() == "free") {
    print "   MySQL port      = " . get_mysql_port() . " In use by another program.\n";
}
if (!port_in_use(get_mysql_port()) && get_mysql_tracker() == "free") {
    print "   MySQL port      = " . get_mysql_port() . " Is free to use.\n";
}
# Modified Last By: Olajide Olaolorun (empirex) Mike Gleaves (Ric) 
# Web: http://www.uniformserver.com
# Notes: Generate server key and certificate.
#############################################################################
*/
// Includes
include_once "includes/config.inc.php";
include_once "{$us_apanel}/includes/lang/" . file_get_contents("{$us_apanel}/includes/.lang") . ".php";
include_once "includes/header.php";
include_once "includes/secure.php";
include_once "{$usf_con_functions}";
$file_name = basename(__FILE__);
// This scripts name
if (@$_POST['Generate_confirm'] == $US['cert-confirm-button']) {
    // User clicked generate
    if (get_apache_tracker() == "service") {
        // Is Apache running as a service
        // yes: Running as service
        print "<div id=\"main\">";
        print "<h2>&#187; " . $US['cert-head1'] . "</h2>";
        print "<h3>" . $US['cert-head3'] . "</h3>";
        print "<p>" . $US['cert-txt2'] . "</p>";
        print "<p>{$us_con}/key_cert_gen/Run.bat</p>";
        print "<p>" . $US['cert-txt3'] . "</p>";
        print "</div>";
    } else {
        // no: standard program
        $cmd1 = 'start ';
        $cmd2 = $us_con . '/key_cert_gen/Run.bat';
        // Plugins script
        $cmd = $cmd1 . $cmd2;
Exemplo n.º 4
0
    //User has not enabled this in config.inc.php
    print " MySQL service not enabled in config.inc.php\n";
    print " Or disabled by a user parameter\n";
}
// ================================================== END RUN MYSQL SERVICE ===
print "\n";
// == RUN APACHE SERVICE =====================================================
if ((int) $server_operation & 1) {
    // Server enabled by config or parameter
    // === Check server running
    if (apache_running() && file_exists($usf_apache_pid)) {
        if (get_apache_tracker() == 'program') {
            // Server running as a standard program
            print " Unable to install Apache service!\n Apache Server is running as a standard program.\n";
        }
        if (get_apache_tracker() == 'service') {
            // Server running as a service
            print " Apache Server already installed as a service.\n";
        }
    } else {
        // server not running, we have a chance to run as a service if ports are free!
        // === Port tests ==========================================
        $failed = false;
        // Assume ports pass test
        //=== Apache:
        $apache_port = get_apache_port();
        if (port_in_use($apache_port)) {
            echo " Apache port = " . $apache_port . "   - Failed port already in use!\n";
            $failed = true;
            // Set failed flag
        } else {
Exemplo n.º 5
0
# Comment: Alows multi-servers to run on same PC.
# Moves Server to different ports changes service names
###############################################################################
*/
#error_reporting(0); // Disable PHP errors and warnings
// Comment to Enable for testing
chdir(dirname(__FILE__));
// Change wd to this files location
include_once "../main/includes/config.inc.php";
include_once "../main/includes/functions.php";
run_location_tracker();
// Have servers moved if moved
// update configuration accordingly
print "\n";
//=== Both servers must be stopped and not installed as a service =============
if (get_apache_tracker() != "free" || get_mysql_tracker() != "free") {
    print " This script was terminated!\n\n";
    print " The servers are either running or installed as a service.\n";
    print " Please stop and uninstall the servers\n\n";
    print " Then run this script again.\n\n";
    exit;
}
print " ##############################################################################################\n";
print " #                                                                                            #\n";
print " # Uniform Server: Move Server to different ports change service name                         #\n";
print " #                                                                                            #\n";
print " #--------------------------------------------------------------------------------------------#\n";
print " # This script must be run on a clean server                                                  #\n";
print " #                                                                                            #\n";
print " # 1) To accept defaults [shown in square brackets] press enter                               #\n";
print " #                                                                                            #\n";