Add defaupt path to --conffile, if not set.

Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
Thomas Hochstein 2026-07-05 12:44:00 +02:00
parent f3b184f2e3
commit efcd83e5e9
2 changed files with 3 additions and 0 deletions

View file

@ -101,6 +101,8 @@ sub ReadConfig {
my ($ConfFile) = @_;
# set default
$ConfFile = $HomePath . '/etc/newsstats.conf' if !$ConfFile;
# add default path if none is set
$ConfFile = $HomePath . '/etc/' . $ConfFile if ($ConfFile !~ /[\\\/]/);
# mandatory configuration options
my @Mandatory = ('DBDriver','DBHost','DBUser','DBPw','DBDatabase',
'DBTableRaw','DBTableGrps');