summaryrefslogtreecommitdiff
path: root/bin/tron-scan
blob: 914d6d4076c84efafb1a97c67447c988e96d1d9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;