function scan_hours() { $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid"; $oldpid = @file_get_contents($pidfile); $unix = new unix(); if ($unix->process_exists($oldpid)) { if ($GLOBALS["VERBOSE"]) { echo "Already executed pid {$oldpid}\n"; } die; } $mypid = getmypid(); @file_put_contents($pidfile, $mypid); $GLOBALS["Q"]->FixTables(); $php5 = $unix->LOCATE_PHP5_BIN(); shell_exec("{$php5} /usr/share/artica-postfix/exec.fcron.php --squid-recategorize-task &"); table_days(); clients_hours(true); members_hours(true); }
die; } if ($argv[1] == '--block-week') { die; } if ($argv[1] == "--week") { week_uris(true); youtube_week(); die(true); } if ($argv[1] == '--flow-month') { flow_month(); die; } if ($argv[1] == '--members') { members_hours(); die; } if ($argv[1] == '--members-month') { members_month(); die; } if ($argv[1] == '--parse-cacheperfs') { squid_cache_perfs(); die; } if ($argv[1] == '--show-tables') { show_tables(); die; } if ($argv[1] == '--tables') {