Skip to content

Commit

Permalink
Fix #609 — Handle boilerplate db_type conf in sympa.pl --health_check
Browse files Browse the repository at this point in the history
  • Loading branch information
ldidry committed May 17, 2019
1 parent 15002e2 commit a80c00f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sbin/sympa.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,17 @@ if ($main::options{'upgrade_config_location'}) {
$Conf::Conf{'etc'};
}

## Check if the db_type is not the boilerplate one
if ($Conf::Conf{'db_type'} eq '(You must define this parameter)') {
die sprintf
"Database type \"%s\" defined in sympa.conf is the boilerplate one and is obviously incorrect. Verify db_xxx parameters in sympa.conf\n",
$Conf::Conf{'db_type'};
}

## Check database connectivity and probe database
unless (Sympa::DatabaseManager::probe_db()) {
die sprintf
"Database %s defined in sympa.conf has not the right structure or is unreachable. verify db_xxx parameters in sympa.conf\n",
"Database %s defined in sympa.conf has not the right structure or is unreachable. Verify db_xxx parameters in sympa.conf\n",
$Conf::Conf{'db_name'};
}

Expand Down

0 comments on commit a80c00f

Please sign in to comment.