Example #1
0
function exec_background($filename, $args = '')
{
    global $config, $debug;
    if (read_config_option('log_verbosity') >= POLLER_VERBOSITY_DEBUG || $debug) {
        cacti_log("DEBUG: About to Spawn a Remote Process [CMD: {$filename}, ARGS: {$args}]", true, 'POLLER');
    }
    if (file_exists($filename)) {
        if ($config['cacti_server_os'] == 'win32') {
            pclose(popen("start \"Cactiplus\" /I \"" . $filename . "\" " . $args, 'r'));
        } else {
            exec($filename . ' ' . $args . ' > /dev/null &');
        }
    } elseif (file_exists_2gb($filename)) {
        exec($filename . ' ' . $args . ' > /dev/null &');
    }
}
Example #2
0
function exec_background($filename, $args = "")
{
    global $config, $debug;
    if (read_config_option("log_verbosity") >= POLLER_VERBOSITY_DEBUG || $debug) {
        cacti_log("DEBUG: About to Spawn a Remote Process [CMD: {$filename}, ARGS: {$args}]", true, "POLLER");
    }
    if (file_exists($filename)) {
        if ($config["cacti_server_os"] == "win32") {
            pclose(popen("start \"Cactiplus\" /I \"" . $filename . "\" " . $args, "r"));
        } else {
            exec($filename . " " . $args . " > /dev/null &");
        }
    } elseif (file_exists_2gb($filename)) {
        exec($filename . " " . $args . " > /dev/null &");
    }
}
Example #3
0
function exec_background($filename, $args = "") {
	global $config;

	if (read_config_option("log_verbosity") == POLLER_VERBOSITY_DEBUG) {
		cacti_log("DEBUG: About to Spawn a Remote Process [CMD: $filename, ARGS: $args]", true, "POLLER");
	}

	if (file_exists($filename)) {
		if (CACTI_SERVER_OS == "win32") {
			pclose(popen("start \"Cactiplus\" /I \"" . $filename . "\" " . $args, "r"));
		}else{
			exec($filename . " " . $args . " > /dev/null &");
		}
	}elseif (file_exists_2gb($filename)) {
		exec($filename . " " . $args . " > /dev/null &");
	}
}