diff options
author | ivan <ivan> | 2006-12-14 09:27:26 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-12-14 09:27:26 +0000 |
commit | 7422aa77086326ba1e6032150ce5704d1003ea6f (patch) | |
tree | 9a69bc3c41f13a944198ae882933aa51cc9f6a5c /bin | |
parent | dcdf657e77ec7b46dc69e19a849a9c133123db7c (diff) |
make the config directory configurable
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dbdef-create | 2 | ||||
-rwxr-xr-x | bin/mapsecrets2access_user | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/bin/dbdef-create b/bin/dbdef-create index 2283b533f..5063a3ce9 100755 --- a/bin/dbdef-create +++ b/bin/dbdef-create @@ -13,7 +13,7 @@ $FS::CurrentUser::upgrade_hack = 1; my($dbh)=adminsuidsetup $user; #needs to match FS::Record -my($dbdef_file) = "/usr/local/etc/freeside/dbdef.". datasrc; +my($dbdef_file) = "%%%FREESIDE_CONF%%%/dbdef.". datasrc; my $dbdef = new_native DBIx::DBSchema $dbh; diff --git a/bin/mapsecrets2access_user b/bin/mapsecrets2access_user index 4efd90b2b..945f130ef 100755 --- a/bin/mapsecrets2access_user +++ b/bin/mapsecrets2access_user @@ -46,8 +46,10 @@ unless ( $supergroup ) { } my $supergroupnum = $supergroup->groupnum; -my $mapsecrets = '/usr/local/etc/freeside/mapsecrets'; -open(MAPSECRETS, "<$mapsecrets") or die $!; +my $conf = new FS::Conf; +my $dir = $conf->base_dir; +my $mapsecrets = "$dir/mapsecrets"; +open(MAPSECRETS, "<$mapsecrets") or die "Can't open $mapsecrets: $!"; while (<MAPSECRETS>) { /([\w]+)\s+secrets\s*$/ or die "unparsable line in mapsecrets: $_"; my $username = $1; |