5 use FS::UID qw(adminsuidsetup);
7 use FS::Record qw(qsearch qsearchs dbh);
12 &untaint_argv; #what it sounds like (eww)
15 my $user = shift or die &usage;
18 my @monitored = qsearch('svc_dsl', { 'monitored' => 'Y' } );
19 foreach my $svc_dsl ( @monitored ) {
20 my @exports = $svc_dsl->part_svc->part_export_dsl_pull;
21 my $svcnum = $svc_dsl->svcnum;
22 warn "either zero or more than one DSL-pulling export attached to svcnum "
23 . "$svcnum, skipping" if ( scalar(@exports) != 1 );
24 my $export = $exports[0];
25 my $error = $export->dsl_pull($svc_dsl); # this will commit to db by default
26 warn "Error pulling DSL svcnum $svcnum: $error" unless $error eq '';
34 foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV
35 #$ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
37 $ARGV[$_] =~ /^(.*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
43 die "Usage:\n freeside-pull-dsl user \n";
52 freeside-pull-dsl - Pull DSL order data from telcos/vendors for all monitored DSL orders to update
56 freeside-pull-dsl user
60 user - name of an internal Freeside user
62 This is still a work in progress - in future may add limiting by exportnum or svcpart or other such stuff.
68 L<FS::cust_main>, config.html from the base documentation