hardcoded path to config file in /etc/mail

This commit is contained in:
mischa 2022-08-22 16:41:46 +00:00
parent 9494dd352a
commit bfeba8824e
1 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ use Getopt::Std;
use DBI; use DBI;
use POSIX qw(strftime); use POSIX qw(strftime);
# -c = location of the SQL config file for OpenSMTPD # -c = location of the SQL config file for OpenSMTPD, located in /etc/mail
# -l = logging of virtual vacation parsed report/filter streams and decisions # -l = logging of virtual vacation parsed report/filter streams and decisions
# -v = verbose (extra flag) logging of report stream # -v = verbose (extra flag) logging of report stream
# -d = debug (extra flag) logging of filter stream # -d = debug (extra flag) logging of filter stream
@ -35,8 +35,8 @@ my $db_user = '';
my $db_pass = ''; my $db_pass = '';
my $db_name = ''; my $db_name = '';
if ($opt_c && -e $opt_c) { if ($opt_c && -e "/etc/mail/$opt_c") {
open (my $fh_config, '<', $opt_c); open (my $fh_config, '<', "/etc/mail/$opt_c");
while (my $line = <$fh_config>) { while (my $line = <$fh_config>) {
chomp $line; chomp $line;
if ($line =~ /^host\s+(.*)$/) { $db_host = $1; } if ($line =~ /^host\s+(.*)$/) { $db_host = $1; }