Bug 19547: MariaDB install has no debian.cnf
authorMark Tompsett <mtompset@hotmail.com>
Mon, 30 Oct 2017 21:59:43 +0000 (17:59 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 19 Mar 2018 16:55:46 +0000 (13:55 -0300)
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>

debian/scripts/koha-create

index 3f85cb2..1312ee3 100755 (executable)
@@ -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 }