#!/usr/bin/env php ] NOTE, by default $scriptname asks 'Are you sure want to delete (y/N)?'. To assume 'yes' as answer to all prompts and run non-interactively, add '-y' in command line. Not necessary when run from cron (determined automatically). OPTIONS: -V Show version and exit. -y Automatically answer 'yes' to prompts -a Maintain all modules except billing as specified below. -s Clean up syslog -e Clean up event log -l Clean up alert log -u Clean up auth log -i Clean up inventory -r Clean up unused RRD files -p Clean up deleted ports -b Clean up stale database entries -A Specifies maximum age for all modules (overrides configuration) -f Force run Housekeeping on Poller ID other than 0 (main) -x Clean up billing data DEBUGGING OPTIONS: -T Testing, not do any actions, only show counts. -d Enable debugging output. -dd More verbose debugging output. EXAMPLES: $scriptname -a Clean up by all modules interactively (with prompts!) $scriptname -ya Clean up by all modules without prompts %rInvalid arguments!%n", 'color', FALSE); exit; } $test = isset($options['T']); foreach ($modules as $module) { if (is_file($config['install_dir'] . "/includes/housekeeping/$module.inc.php")) { include($config['install_dir'] . "/includes/housekeeping/$module.inc.php"); if (!$test) { set_obs_attrib("housekeeping_lastrun_$module", time()); } } else { print_warning("Housekeeping module not found: $module"); } } if (!$test) { set_obs_attrib("housekeeping_lastrun", time()); } // EOF