From 64be74b3380441b645ec808e0c30455e76b326e1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 27 Sep 2017 16:19:07 -0300 Subject: [PATCH] Bug 18342: Enable memcached by default for new installs Note that there is no way to create an install without memcached. As it is now considered as stable, there is no point to not use it. Test plan: Create a new Koha install and make sure memcached is enabled by default Signed-off-by: Kyle M Hall Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- Makefile.PL | 2 +- debian/docs/koha-create.xml | 15 --------------- debian/scripts/koha-create | 27 +++------------------------ debian/templates/koha-sites.conf | 4 ++-- rewrite-config.PL | 2 +- 5 files changed, 7 insertions(+), 43 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index ecd4297460..0068424a9d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -483,7 +483,7 @@ my %config_defaults = ( 'PAZPAR2_PORT' => '11002', 'RUN_DATABASE_TESTS' => 'no', 'PATH_TO_ZEBRA' => '', - 'USE_MEMCACHED' => 'no', + 'USE_MEMCACHED' => 'yes', 'MEMCACHED_SERVERS' => '127.0.0.1:11211', 'MEMCACHED_NAMESPACE' => 'KOHA', 'TEMPLATE_CACHE_DIR' => '/tmp/koha', diff --git a/debian/docs/koha-create.xml b/debian/docs/koha-create.xml index 632140d471..d4bbadb40d 100644 --- a/debian/docs/koha-create.xml +++ b/debian/docs/koha-create.xml @@ -29,7 +29,6 @@ en|es|fr|gr|nb|ru|uk dom|grs1 dom|grs1 - server:port namespace_prefix /path/to/some.sql @@ -150,13 +149,6 @@ - - - - Make the Koha instance use memcached. . - - - @@ -286,13 +278,6 @@ - - - - Valid values are and . If not present koha-create will default to . Also, this will be overriden by the switch. - - - diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index cdfa63d813..e0fd5cdd77 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -57,7 +57,6 @@ Options: values are dom (default) and grs1. --biblio-idx idx_mode Set the indexing mode for bibliographic records. Valid values are dom (default) and grs1. - --use-memcached Set the instance to make use of memcache. --memcached-servers str Set a comma-separated list of host:port memcached servers. --memcached-prefix str Set the desired prefix for the instance memcached namespace. --enable-sru Enable the Z39.50/SRU server (default: disabled). @@ -404,7 +403,7 @@ ADMINUSER="1" PASSWDFILE="/etc/koha/passwd" # memcached variables -USE_MEMCACHED="no" +USE_MEMCACHED="yes" MEMCACHED_SERVERS="" MEMCACHED_PREFIX="" # hardcoded memcached defaults @@ -444,7 +443,7 @@ fi [ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) -TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,template-cache-dir:,upload-path:,letsencrypt, \ +TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,template-cache-dir:,upload-path:,letsencrypt, \ -n "$0" -- "$@"` # Note the quotes around `$TEMP': they are essential! @@ -473,8 +472,6 @@ while true ; do op=populate ; shift ;; -u|--use-db) op=use ; shift ;; - --use-memcached) - USE_MEMCACHED="yes" ; shift ;; --memcached-servers) CLO_MEMCACHED_SERVERS="$2" ; shift 2 ;; --memcached-prefix) @@ -586,25 +583,7 @@ NO_DB die; fi -if [ "$USE_MEMCACHED" = "yes" ]; then - set_memcached $name -elif [ "$CLO_MEMCACHED_SERVERS" != "" ] || \ - [ "$CLO_MEMCACHED_PREFIX" != "" ]; then - - MSG=`cat < 'grs1', "__RUN_DATABASE_TESTS__" => 'no', "__PATH_TO_ZEBRA__" => "", - "__USE_MEMCACHED__" => 'no', + "__USE_MEMCACHED__" => 'yes', "__MEMCACHED_SERVERS__" => "", "__MEMCACHED_NAMESPACE__" => "", "__FONT_DIR__" => "/usr/share/fonts/truetype/ttf-dejavu", -- 2.39.5