diff --git a/scripts/importRatingTables.php b/scripts/importRatingTables.php index 0672369..7145f29 100755 --- a/scripts/importRatingTables.php +++ b/scripts/importRatingTables.php @@ -1,32 +1,32 @@ #!/usr/bin/env php ImportCSVFiles(); if ($RatingTables->mustReload) { if (!reloadRatingEngineTables()) { print "Error: cannot connect to network rating engine\n"; } } diff --git a/scripts/purgeTables.php b/scripts/purgeTables.php index 9fb22d6..adbe247 100755 --- a/scripts/purgeTables.php +++ b/scripts/purgeTables.php @@ -1,38 +1,38 @@ #!/usr/bin/env php purge(); print "\n"; // purge old CDRs when using a central radius table while (list($k,$v) = each($DATASOURCES)) { if (strlen($v['purgeCDRsAfter'])) { $class_name = $v["class"]; $log = sprintf("Datasource: %s\n", $v['name']); print $log; syslog(LOG_NOTICE, $log); unset($CDRS); $CDRS = new $class_name($k); if ($argv[1] && !preg_match("/^(\d{4})(\d{2})$/", $argv[1], $m)) { print "Error: Month must be in YYYYMM format\n"; continue; } else { $endDate = date('Y-m-d', time() - 3600 * 24 * $v['purgeCDRsAfter']); $log = sprintf("Purge CDRs before %s\n", $endDate); print $log; syslog(LOG_NOTICE, $log); } $CDRS->purgeTable($argv[1]); print "\n"; } } diff --git a/scripts/reloadRatingTables.php b/scripts/reloadRatingTables.php index 2dafe51..a0f08e8 100755 --- a/scripts/reloadRatingTables.php +++ b/scripts/reloadRatingTables.php @@ -1,15 +1,11 @@ #!/usr/bin/env php splitRatingTable();