4 use vars qw( $opt_p $opt_g );
6 use FS::UID qw(adminsuidsetup);
7 use FS::Record qw( qsearch ); #qsearchs );
10 my $user = shift or die &usage;
17 push @svc_x, map { $_->svc_acct } qsearch('cust_svc', { svcpart=>$opt_p } );
18 die "no services with svcpart $opt_p found\n" unless @svc_x;
23 foreach my $svc_x ( @svc_x ) {
24 next if $opt_g && $svc_x->gid == $opt_g;
25 $svc_x->gid($opt_g) if $opt_g;
26 my $error = $svc_x->replace;
31 return "Usage:\n\n freeside-svc_acct-bulk_change user -p svcpart -g gid\n";
36 freeside-svc_acct-bulk_change - Command line tool to make bulk changes to svc_acct (account) records
40 freeside-svc_acct-bulk_change user -p svcpart -g gid
44 For the servcies of the given svcpart, changes the GID as specified.
46 Note: Unless you are changing the GID to match an new, fixed value in the
47 service definition, you will need to enable the B<svc_acct-edit_gid>
48 configuration setting prior to running this script.