Bug 21426: Handle USE_MEMCACHED=no in koha-create
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Sat, 29 Sep 2018 18:16:46 +0000 (15:16 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 9 Oct 2018 15:02:48 +0000 (15:02 +0000)
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

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

debian/scripts/koha-create

index afe1f55..5e60f7c 100755 (executable)
@@ -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