logrotatelogs(true); Clean_tmp_path(true); die; } if ($argv[1] == '--clean-sessions') { sessions_clean(); Clean_tmp_path(true); logrotatelogs(true); die; } if ($argv[1] == '--clean-install') { CleanOldInstall(); die; } if ($argv[1] == '--paths-status') { PathsStatus(); die; } if ($argv[1] == '--maillog') { maillog(); die; } if ($argv[1] == '--wrong-numbers') { wrong_number(); die; } if ($argv[1] == '--DirectoriesSize') { DirectoriesSize(); die; } if ($argv[1] == '--cleanbin') {
if(posix_getuid()<>0){die("Cannot be used in web server mode\n\n");} include_once(dirname(__FILE__).'/ressources/class.templates.inc'); include_once(dirname(__FILE__).'/ressources/class.ini.inc'); include_once(dirname(__FILE__).'/framework/class.unix.inc'); include_once(dirname(__FILE__).'/framework/frame.class.inc'); include_once(dirname(__FILE__).'/ressources/class.os.system.inc'); include_once(dirname(__FILE__).'/ressources/class.system.network.inc'); if(preg_match("#--verbose#",implode(" ",$argv))){$GLOBALS["VERBOSE"]=true;} if(preg_match("#--force#",implode(" ",$argv))){$GLOBALS["FORCE"]=true;} if($argv[1]=='--clean-tmp'){CleanLogs();die();} if($argv[1]=='--clean-sessions'){sessions_clean();die();} if($argv[1]=='--clean-install'){CleanOldInstall();die();} if($argv[1]=='--paths-status'){PathsStatus();die();} if($argv[1]=='--maillog'){maillog();die();} if(systemMaxOverloaded()){ writelogs("This system is too many overloaded, die()",__FUNCTION__,__FILE__,__LINE__); die(); } function init(){ $sock=new sockets(); $ArticaMaxLogsSize=$sock->GET_PERFS("ArticaMaxLogsSize"); if($ArticaMaxLogsSize<1){$ArticaMaxLogsSize=500;} $ArticaMaxLogsSize=$ArticaMaxLogsSize*1000; $GLOBALS["ArticaMaxLogsSize"]=$ArticaMaxLogsSize;