X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fsvc.replace;fp=bin%2Fsvc.replace;h=1d2513a3347fef372b3a1f93f3409198d7f0e250;hp=0000000000000000000000000000000000000000;hb=556e722992efcab0c7c52cd55b7b3a133bef250e;hpb=c3fcc93441665b40e3b2bdc22653a8fe43372ea4 diff --git a/bin/svc.replace b/bin/svc.replace new file mode 100644 index 000000000..1d2513a33 --- /dev/null +++ b/bin/svc.replace @@ -0,0 +1,21 @@ +#!/usr/bin/perl -w + +use strict; +use FS::UID qw( adminsuidsetup ); +use FS::Record qw( qsearch ); +use FS::cust_svc; + +my $user = shift or die &usage; +adminsuidsetup; + +my $svcpart = shift or die &usage; + +foreach my $cust_svc ( qsearch('cust_svc', { 'svcpart'=>$svcpart } ) ) { + my $svc_x = $cust_svc->svc_x; + my $error = $svc_x->replace; + warn "$error\n" if $error +} + +sub usage { + die "Usage\n\n svc.replace user svcpart\n"; +}