writelogs(basename(__FILE__) . ":Executed", basename(__FILE__), __FILE__, __LINE__); } if ($argv[1] == "--setup-center") { setup_center(); die; } if ($argv[1] == "--services") { services(); die; } if ($argv[1] == "--mysql") { test_mysql(); die; } if ($argv[1] == "--monit") { test_monit(); die; } if ($argv[1] == "--roundcube") { $_GET["front_page_notify"] = front_page_notify(); status_roundcube_version(); die; } if ($argv[1] == '--force') { $_GET["FORCE"] = true; } if (!$_GET["FORCE"]) { if (system_is_overloaded()) { die; } if (!Build_pid_func(__FILE__, "MAIN")) {
if(systemMaxOverloaded()){ writelogs("This system is too many overloaded, die()",__FUNCTION__,__FILE__,__LINE__); if(!$GLOBALS["FORCE"]){die();} } if($GLOBALS["VERBOSE"]){ writelogs(basename(__FILE__).":Executed",basename(__FILE__),__FILE__,__LINE__); } if($argv[1]=="--setup-center"){setup_center();die();} if($argv[1]=="--services"){services();die();} if($argv[1]=="--mysql"){test_mysql();die();} if($argv[1]=="--monit"){test_monit();die();} if($argv[1]=='--force'){$_GET["FORCE"]=true;} if(!$_GET["FORCE"]){ if(system_is_overloaded()){die();} if(!Build_pid_func(__FILE__,"MAIN")){ if(!is_file("/usr/share/artica-postfix/ressources/logs/status.right.1.html")){status_right();} writelogs(basename(__FILE__).":Already executed.. aborting the process",basename(__FILE__),__FILE__,__LINE__); die(); } } if($argv[1]=='--setup'){ setup_center(); error_log("setup_center() die in ".__FILE__); die();