From 4af380c3799bbcdb33c4ce17b51e3220ac81768d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Charaoui?= Date: Tue, 5 Jun 2018 15:59:13 -0400 Subject: [PATCH] Restart memcached after koha-remove, if needed This avoids stale data, such as database credentials, from remaining in cache. --- debian/scripts/koha-remove | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/scripts/koha-remove b/debian/scripts/koha-remove index 65e7a03..ca8230a 100755 --- a/debian/scripts/koha-remove +++ b/debian/scripts/koha-remove @@ -138,4 +138,14 @@ eof a2dissite "$name" > /dev/null 2>&1 || a2dissite "${name}.conf" > /dev/null 2>&1 || /bin/true done +if [ -e /etc/koha/koha-sites.conf ] +then + . /etc/koha/koha-sites.conf +fi + +if [ "$USE_MEMCACHED" = "yes" ]; then + # restart memcached to clear any data related to the removed instance(s) + systemctl restart memcached +fi + service apache2 restart -- 2.11.0