From 9a6bcfb3e5ae746e8e9c45b63c6f4a47f133c1ec Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Sat, 29 Sep 2018 15:16:46 -0300
Subject: [PATCH] Bug 21426: Handle USE_MEMCACHED=no in koha-create

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Works as intended. I've set USE_MEMCACHED to "no" and created a new
Koha instance. Home > About now reports this information: Memcached:
Servers: undefined | Namespace: undefined | Status: unknown | Config
read from: Nowhere [...] | Effective caching method: Cache::Memory
---
 debian/scripts/koha-create | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create
index 874c7d1c79..3cb2f634a2 100755
--- a/debian/scripts/koha-create
+++ b/debian/scripts/koha-create
@@ -506,7 +506,13 @@ NO_DB
     die;
 fi
 
-set_memcached $name
+if [ "$USE_MEMCACHED" = "no" ]; then
+    MEMCACHED_SERVERS=""
+    MEMCACHED_NAMESPACE=""
+    MEMCACHED_PREFIX=""
+else
+    set_memcached $name
+fi
 
 # Set template cache dir
 if [ "$CLO_TEMPLATE_CACHE_DIR" != "" ]; then
-- 
2.11.0