@@ -, +, @@ --- debian/scripts/koha-functions.sh | 26 ++++++++++++++++++++++++++ debian/scripts/koha-plack | 2 ++ 2 files changed, 28 insertions(+) --- a/debian/scripts/koha-functions.sh +++ a/debian/scripts/koha-functions.sh @@ -43,6 +43,32 @@ get_apache_config_for() fi } +get_memcached_servers_for() +{ + local instance=$1 + + local apache_file=$(get_apache_config_for $instance) + local memcached_servers=$( + grep 'MEMCACHED_SERVERS' ${apache_file} | + awk '{print $3}' | uniq + ) + + echo "${memcached_servers}" +} + +get_memcached_namespace_for() +{ + local instance=$1 + + local apache_file=$(get_apache_config_for $instance) + local memcached_namespace=$( + grep 'MEMCACHED_NAMESPACE' ${apache_file} | + awk '{print $3}' | uniq + ) + + echo "${memcached_namespace}" +} + get_opacdomain_for() { local site=$1 --- a/debian/scripts/koha-plack +++ a/debian/scripts/koha-plack @@ -84,6 +84,8 @@ start_plack() if ! is_plack_running ${instancename}; then export KOHA_CONF="/etc/koha/sites/${instancename}/koha-conf.xml" + export MEMCACHED_SERVERS=$(get_memcached_servers_for $instancename) + export MEMCACHED_NAMESPACE=$(get_memcached_namespace_for $instancename) log_daemon_msg "Starting Plack daemon for ${instancename}" --