Add defaupt path to --conffile, if not set.
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
parent
f3b184f2e3
commit
0b87ff7bc6
1 changed files with 2 additions and 0 deletions
|
|
@ -101,6 +101,8 @@ sub ReadConfig {
|
||||||
my ($ConfFile) = @_;
|
my ($ConfFile) = @_;
|
||||||
# set default
|
# set default
|
||||||
$ConfFile = $HomePath . '/etc/newsstats.conf' if !$ConfFile;
|
$ConfFile = $HomePath . '/etc/newsstats.conf' if !$ConfFile;
|
||||||
|
# add default path if none is set
|
||||||
|
$ConfFile = $HomePath . '/etc/' . $ConfFile if ($ConfFile !~ /[\\\/]/);
|
||||||
# mandatory configuration options
|
# mandatory configuration options
|
||||||
my @Mandatory = ('DBDriver','DBHost','DBUser','DBPw','DBDatabase',
|
my @Mandatory = ('DBDriver','DBHost','DBUser','DBPw','DBDatabase',
|
||||||
'DBTableRaw','DBTableGrps');
|
'DBTableRaw','DBTableGrps');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue