Пример #1
0
function build_server_mode(){
	$sock=new sockets();
	$ActAsASyslogServer=$sock->GET_INFO("ActAsASyslogServer");
	if(!is_numeric($ActAsASyslogServer)){
		echo "Starting......: syslog server parameters not defined, aborting tasks\n";
	}
	
	if(is_file("/etc/default/syslogd")){
		echo "Starting......: syslog old syslog mode\n";
		build_server_mode_debian();
		return;
	}
	
	if(is_dir("/etc/rsyslog.d")){
		echo "Starting......: syslog rsyslog mode\n";
		build_server_mode_ubuntu();
	}
}
Пример #2
0
function build_stats_appliance()
{
    rsyslog_check_includes();
    build_server_mode_debian();
}
Пример #3
0
function build_server_mode()
{
    $sock = new sockets();
    $ActAsASyslogServer = $sock->GET_INFO("ActAsASyslogServer");
    $EnableWebProxyStatsAppliance = $sock->GET_INFO("EnableWebProxyStatsAppliance");
    if (is_file("/etc/artica-postfix/WEBSTATS_APPLIANCE")) {
        $ActAsASyslogServer = 1;
        $EnableWebProxyStatsAppliance = 1;
        $sock->SET_INFO("ActAsASyslogServer", 1);
        $sock->SET_INFO("EnableWebProxyStatsAppliance", 1);
    }
    if (!is_numeric($EnableWebProxyStatsAppliance)) {
        $EnableWebProxyStatsAppliance = 0;
    }
    if ($EnableWebProxyStatsAppliance == 1) {
        $ActAsASyslogServer = 1;
        $sock->SET_INFO("ActAsASyslogServer", 1);
    }
    if (!is_numeric($ActAsASyslogServer)) {
        echo "Starting......: " . date("H:i:s") . " syslog server parameters not defined, aborting tasks\n";
        return;
    }
    if (is_file("/etc/default/syslogd")) {
        echo "Starting......: " . date("H:i:s") . " syslog old syslog mode\n";
        build_server_mode_debian();
        if ($GLOBALS["NORESTART"]) {
            return;
        }
        shell_exec("/etc/init.d/auth-tail restart");
        return;
    }
    if (is_dir("/etc/rsyslog.d")) {
        echo "Starting......: " . date("H:i:s") . " syslog rsyslog mode\n";
        build_server_mode_ubuntu();
        if ($GLOBALS["NORESTART"]) {
            return;
        }
        shell_exec("/etc/init.d/auth-tail restart");
    }
}