Пример #1
0
        $GLOBALS["OUTPUT"] = true;
        SingleInstance_reload();
        die;
    }
}
parsecmdlines($argv);
if ($argv[1] == "--startall") {
    if ($EnablePostfixMultiInstance == 1) {
        $GLOBALS["START_ONLY"] == 1;
        MultiplesInstancesFound(true, true);
        die;
    }
}
if ($EnablePostfixMultiInstance == 1) {
    if ($GLOBALS["STATUS"]) {
        MultiplesInstances_status();
        die;
    }
    if ($GLOBALS["START_ONLY"] == 1) {
        MultiplesInstances_start($GLOBALS["hostname"], $GLOBALS["ou"]);
        die;
    }
    if ($GLOBALS["STOP_ONLY"] == 1) {
        MultiplesInstances_stop($GLOBALS["hostname"], $GLOBALS["ou"]);
        die;
    }
    if ($argv[1] == "--database") {
        parse_multi_databases();
        die;
    }
    MultiplesInstances($GLOBALS["hostname"], $GLOBALS["ou"]);
Пример #2
0
include_once(dirname(__FILE__)."/framework/class.unix.inc");
include_once(dirname(__FILE__)."/ressources/class.fetchmail.inc");
include_once(dirname(__FILE__)."/framework/frame.class.inc");
include_once(dirname(__FILE__)."/ressources/class.maincf.multi.inc");


$GLOBALS["ROOT"]=true;
parsecmdlines($argv);
$unix=new unix();
$sock=new sockets();
$_GLOBAL["miltergreylist_bin"]=$unix->find_program("milter-greylist");
if(!is_file($_GLOBAL["miltergreylist_bin"])){die();}
$EnablePostfixMultiInstance=$sock->GET_INFO("EnablePostfixMultiInstance");
if($EnablePostfixMultiInstance==1){
	if($GLOBALS["STATUS"]){	MultiplesInstances_status();die();}
	if($GLOBALS["START_ONLY"]==1){	MultiplesInstances_start($GLOBALS["hostname"],$GLOBALS["ou"]);die();}
	if($GLOBALS["STOP_ONLY"]==1){	MultiplesInstances_stop($GLOBALS["hostname"],$GLOBALS["ou"]);die();}
	
	
	MultiplesInstances($GLOBALS["hostname"],$GLOBALS["ou"]);exit;
}

SingleInstance();

function parsecmdlines($argv){
	$GLOBALS["COMMANDLINE"]=implode(" ",$argv);
	if(strpos($GLOBALS["COMMANDLINE"],"--verbose")>0){$GLOBALS["VERBOSE"]=true;$GLOBALS["debug"]=true;$GLOBALS["DEBUG"]=true;}	
	while (list ($num, $ligne) = each ($argv) ){
		
		if(preg_match("#--verbose#",$ligne)){