summaryrefslogtreecommitdiff
path: root/bin/tron-scan
diff options
context:
space:
mode:
authorivan <ivan>2008-08-22 03:01:06 +0000
committerivan <ivan>2008-08-22 03:01:06 +0000
commit106d0163556c31a3b2cf9c065ec6d9d6ded0ce64 (patch)
treeeb945ad809a8bf524d8b20a9204f18aa24ecd6a7 /bin/tron-scan
parentc1297541457bdfce910e7013cd6dc24254347852 (diff)
the master control program has chosen YOU to serve your system on the game grid
Diffstat (limited to 'bin/tron-scan')
-rwxr-xr-xbin/tron-scan24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/tron-scan b/bin/tron-scan
new file mode 100755
index 000000000..914d6d407
--- /dev/null
+++ b/bin/tron-scan
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+
+use FS::UID qw(adminsuidsetup);
+use FS::Conf;
+use FS::Record qw(qsearch);
+use FS::Tron qw(tron_scan tron_lint);
+use FS::cust_svc;
+
+adminsuidsetup shift;
+
+my $conf = new FS::Conf;
+my $mcp_svcpart = $conf->config('mcp_svcpart') or die "no mcp_svcpart";
+
+#tron_scan($_) foreach qsearch('cust_svc', { 'svcpart' => $mcp_svcpart } );
+foreach my $svc ( qsearch('cust_svc', { 'svcpart' => $mcp_svcpart } ) ) {
+ my $error = tron_scan($svc);
+ warn $error if $error;
+
+ my @lint = tron_lint($svc);
+ print $svc->svc_x->title. "\n". join('', map " $_\n", @lint )
+ if @lint;
+}
+
+1;