Bug 19547: MariaDB install has no debian.cnf

This attempts to handle issues arising when running
koha-create on a system that never had MySQL installed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Mark Tompsett 2017-10-30 17:59:43 -04:00 committed by Jonathan Druart
parent 5b2e491415
commit 8b32870ac0
1 changed files with 5 additions and 0 deletions

View File

@ -126,6 +126,11 @@ generate_config_file() {
}
getmysqlhost() {
if [ ! -f /etc/mysql/debian.cnf ]
then
echo localhost
return
fi
awk '
BEGIN { FS="=" }
$1 ~/\[/ { inclient=0 }