[freeside-devel] current cvs
ivan
ivan at 420.am
Wed Feb 21 15:48:28 PST 2001
On Wed, Feb 21, 2001 at 05:01:46PM -0600, Adam Rose wrote:
> How are planing to implement Postgres with ICRadius since freeside is
> going toward using transactions. Just want to see where I can
> help.
bin/svc_acct.export will need a small fix (checked into CVS) - with this,
you specify your local (MySQL) data source, username and password in an
icradius_secrets configuration file, and Freeside will export to this
local database and then copy the files to the external icradiusmachines,
as before.
ivan at rootwood:~/freeside_current/bin$ cvs diff -u svc_acct.export
Index: svc_acct.export
===================================================================
RCS file: /home/cvs/cvsroot/freeside/bin/svc_acct.export,v
retrieving revision 1.16
diff -u -r1.16 svc_acct.export
--- svc_acct.export 2000/07/06 13:23:29 1.16
+++ svc_acct.export 2001/02/21 23:30:42
@@ -64,6 +64,7 @@
use vars qw($conf);
use Fcntl qw(:flock);
use IO::Handle;
+use DBI;
use FS::Conf;
use FS::SSH qw(scp ssh);
use FS::UID qw(adminsuidsetup datasrc dbh);
@@ -98,8 +99,13 @@
my $icradius_mysqlsource =
$conf->config('icradius_mysqlsource') || "/usr/local/var/freeside"
if $icradiusmachines;
-my $icradius_dbh = dbh; #could eventually get it from a config file if you're
- #not running MySQL for your Freeside database
+my $icradius_dbh;
+if ( $icradiusmachines && $conf->exists('icradius_secrets') ) {
+ $icradius_dbh = DBI->connect($conf->config('icradius_secrets'))
+ or die $DBI::errstr;;
+} else {
+ $icradius_dbh = dbh;
+}
my $textradiusprepend = $conf->config('textradiusprepend');
--
meow
_ivan
More information about the freeside-devel
mailing list