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/mapsecrets2access_user | |
parent | dcdf657e77ec7b46dc69e19a849a9c133123db7c (diff) |
make the config directory configurable
Diffstat (limited to 'bin/mapsecrets2access_user')
-rwxr-xr-x | bin/mapsecrets2access_user | 6 |
1 files changed, 4 insertions, 2 deletions
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; |