SingleInstance_start();
        die;
    }
    if ($argv[1] == "--stop-single") {
        $GLOBALS["OUTPUT"] = true;
        SingleInstance_stop();
        die;
    }
    if ($argv[1] == "--restart-single") {
        $GLOBALS["OUTPUT"] = true;
        SingleInstance_restart();
        die;
    }
    if ($argv[1] == "--reload-single") {
        $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;
function SingleInstance_whitelist()
{
    $sock = new sockets();
    $timefile = "/etc/artica-postfix/pids/exec.milter-greylist.php.SingleInstance_whitelist.pid";
    $MimeDefangEnabled = intval($sock->GET_INFO('MimeDefangEnabled'));
    $MimeDefangAutoWhiteList = intval($sock->GET_INFO("MimeDefangAutoWhiteList"));
    $MilterGreyListEnabled = intval($sock->GET_INFO("MilterGreyListEnabled"));
    if ($MimeDefangEnabled == 0) {
        $MimeDefangAutoWhiteList = 0;
    }
    if ($MimeDefangAutoWhiteList == 0) {
        return;
    }
    if ($MilterGreyListEnabled == 0) {
        return;
    }
    $unix = new unix();
    $timeExec = $unix->file_time_min($timefile);
    if ($timeExec < 10) {
        return;
    }
    @unlink($timefile);
    @file_put_contents($timefile, time());
    $q = new mysql();
    $LastCount = intval($sock->GET_INFO('MimeDefangAutoWhiteListGreyCount'));
    $NeWCount = $q->COUNT_ROWS("autowhite", "artica_backup");
    if ($LastCount == $NeWCount) {
        return;
    }
    SingleInstance_reload();
}