From d96040f28b8b0598f8905b7e8874cdb5180f17b3 Mon Sep 17 00:00:00 2001
From: Mark Tompsett <mtompset@hotmail.com>
Date: Mon, 30 Oct 2017 17:59:43 -0400
Subject: [PATCH] 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.
---
 debian/scripts/koha-create | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create
index 7b6b512..9902f8e 100755
--- a/debian/scripts/koha-create
+++ b/debian/scripts/koha-create
@@ -123,6 +123,11 @@ generate_config_file() {
 }
 
 getmysqlhost() {
+    if [ ! -f /etc/mysql/debian.cnf ]
+    then
+        echo localhost
+        return
+    fi
     awk '
         BEGIN { FS="=" }
         $1 ~/\[/ { inclient=0 }
-- 
2.1.4