X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fsqlradius.pm;h=fd5bb89fd4d05cdddb7c3cc9dca756e105879aae;hb=35effa1bf4ac902547615c816960bbc8db8e7256;hp=8a8f9bebae1c73f1e9f4322fa5dfa91173f4b676;hpb=eb9668a6f3181ee02cb335272c5ee4616e61fd09;p=freeside.git diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm index 8a8f9beba..fd5bb89fd 100644 --- a/FS/FS/part_export/sqlradius.pm +++ b/FS/FS/part_export/sqlradius.pm @@ -1,11 +1,64 @@ package FS::part_export::sqlradius; -use vars qw(@ISA); +use vars qw(@ISA %info %options $notes1 $notes2); +use Tie::IxHash; use FS::Record qw( dbh ); use FS::part_export; @ISA = qw(FS::part_export); +tie %options, 'Tie::IxHash', + 'datasrc' => { label=>'DBI data source ' }, + 'username' => { label=>'Database username' }, + 'password' => { label=>'Database password' }, + 'ignore_accounting' => { + type => 'checkbox', + label=>'Ignore accounting records from this database' + }, +; + +$notes1 = <<'END'; +Real-time export of radcheck, radreply and usergroup tables to any SQL database +for FreeRADIUS, +ICRADIUS +or Radiator. +END + +$notes2 = <<'END'; +An existing RADIUS database will be updated in realtime, but you can use +freeside-sqlradius-reset +to delete the entire RADIUS database and repopulate the tables from the +Freeside database. See the +DBI documentation +and the +documentation for your DBD +for the exact syntax of a DBI data source. + +END + +%info = ( + 'svc' => 'svc_acct', + 'desc' => 'Real-time export to SQL-backed RADIUS (FreeRADIUS, ICRADIUS, Radiator)', + 'options' => \%options, + 'nodomain' => 'Y', + 'notes' => $notes1. + 'This export does not export RADIUS realms (see also '. + 'sqlradius_withdomain). '. + $notes2 +); + sub rebless { shift; } sub export_username { @@ -280,3 +333,5 @@ sub sqlradius_connect { DBI->connect(@_) or die $DBI::errstr; } +1; +