diff options
author | mark <mark> | 2011-11-10 21:40:25 +0000 |
---|---|---|
committer | mark <mark> | 2011-11-10 21:40:25 +0000 |
commit | 7aef2e455fe8a4722036f231ee8609ac63b2a9c9 (patch) | |
tree | e54f586e587f6b58ae2be2e342d779974212a062 /FS/bin/freeside-sqlradius-reset | |
parent | bf8ba5bcc6d128c3ab8e498723257ee54e1db0a7 (diff) |
RADIUS groups for svc_broadband, #14695
Diffstat (limited to 'FS/bin/freeside-sqlradius-reset')
-rwxr-xr-x | FS/bin/freeside-sqlradius-reset | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/FS/bin/freeside-sqlradius-reset b/FS/bin/freeside-sqlradius-reset index a77bad64f..c8da60a4e 100755 --- a/FS/bin/freeside-sqlradius-reset +++ b/FS/bin/freeside-sqlradius-reset @@ -19,14 +19,14 @@ adminsuidsetup $user; my @exports = (); if ( @ARGV ) { foreach my $exportnum ( @ARGV ) { - foreach my $exporttype (qw( sqlradius sqlradius_withdomain phone_sqlradius )) { + foreach my $exporttype (qw( sqlradius sqlradius_withdomain ohone_sqlradius broadband_sqlradius )) { push @exports, qsearch('part_export', { exportnum => $exportnum, exporttype => $exporttype, } ); } } } else { @exports = qsearch('part_export', { exporttype=>'sqlradius' } ); - push @exports, qsearch('part_export', { exporttype=>'sqlradius_withdomain' } ); + push @exports, qsearch('part_export', { exporttype=>'sqlradius_withdomain' } ); } unless ( $opt_n ) { @@ -34,7 +34,8 @@ unless ( $opt_n ) { my $icradius_dbh = DBI->connect( map { $export->option($_) } qw( datasrc username password ) ) or die $DBI::errstr; - for my $table (qw( radcheck radreply usergroup )) { + my $usergroup = $export->option('usergroup') || 'usergroup'; + for my $table (qw( radcheck radreply ), $usergroup) { my $sth = $icradius_dbh->prepare("DELETE FROM $table"); $sth->execute or die "Can't reset $table table: ". $sth->errstr; } |