include_once(dirname(__FILE__).'/ressources/class.ini.inc'); include_once(dirname(__FILE__).'/ressources/class.users.menus.inc'); include_once(dirname(__FILE__).'/ressources/class.mysql.inc'); include_once(dirname(__FILE__).'/ressources/class.os.system.inc'); include_once(dirname(__FILE__)."/framework/class.unix.inc"); include_once(dirname(__FILE__)."/framework/frame.class.inc"); if(preg_match("#--verbose#",implode(" ",$argv))){$GLOBALS["VERBOSE"]=true;$GLOBALS["debug"]=true;} if($argv[1]=="--schedules-mldonkey"){ schedules_mldonkey(); die(); } if($argv[1]=="--postmaster-cron"){ postmaster_cron(); die(); } function schedules_mldonkey(){ @unlink("/etc/artica-postfix/mldonkey.tasks"); $sql="SELECT * FROM mldonkey ORDER BY schedule_time DESC"; $q=new mysql(); $results=$q->QUERY_SQL($sql,"artica_backup"); while($ligne=mysql_fetch_array($results,MYSQL_ASSOC)){
if(isset($_GET["change-mysql-params"])){ChangeMysqlParams();exit;} if(isset($_GET["mysql-myd-file"])){mysql_myd_file();exit;} if(isset($_GET["mysql-check"])){mysql_check();exit;} if(isset($_GET["viewlogs"])){viewlogs();exit;} if(isset($_GET["LdapdbStat"])){LdapdbStat();exit;} if(isset($_GET["LdapdbSize"])){LdapdbSize();exit;} if(isset($_GET["ldap-restart"])){ldap_restart();exit;} if(isset($_GET["buildFrontEnd"])){buildFrontEnd();exit;} if(isset($_GET["cpualarm"])){cpualarm();exit;} if(isset($_GET["CurrentLoad"])){CurrentLoad();exit;} if(isset($_GET["TaskLastManager"])){TaskLastManager();exit;} if(isset($_GET["start-all-services"])){StartAllServices();exit;} if(isset($_GET["kill-pid-number"])){process_kill();exit;} if(isset($_GET["kill-pid-single"])){process_kill_single();exit;} if(isset($_GET["postmaster-cron"])){postmaster_cron();exit;} if(isset($_GET["start-service-name"])){StartServiceCMD();exit;} if(isset($_GET["stop-service-name"])){StopServiceCMD();exit;} if(isset($_GET["START-STOP-SERVICES"])){START_STOP_SERVICES();exit;} if(isset($_GET["monit-status"])){MONIT_STATUS();exit;} if(isset($_GET["monit-restart"])){MONIT_RESTART();exit;} if(isset($_GET["restart-http-engine"])){LIGHTTPD_RESTART();exit;} if(isset($_GET["fcron-restart"])){FCRON_RESTART();exit;} if(isset($_GET["restart-mldonkey"])){MLDONKEY_RESTART();exit;} if(isset($_GET["restart-artica-maillog"])){ARTICA_MAILLOG_RESTART();exit;} if(isset($_GET["notifier-restart"])){EMAILRELAY_RESTART();exit;} if(isset($_GET["cdir-calc"])){IP_CALC_CDIR();exit;} if(isset($_GET["ip-get-default-getway"])){getDefaultGateway();exit;} if(isset($_GET["ip-get-default-dns"])){GetMyDNSServers();exit;} if(isset($_GET["ip-del-route"])){IP_DEL_ROUTE();exit;}