Bugzilla – Attachment 190041 Details for
Bug 16291
koha-remove --purge should also delete '/etc/koha/sites/$instance' dir
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16291: Remove /etc/koha/sites/$name on koha-remove --purge-all
Bug-16291-Remove-etckohasitesname-on-koha-remove--.patch (text/plain), 1.47 KB, created by
David Nind
on 2025-11-28 23:57:28 UTC
(
hide
)
Description:
Bug 16291: Remove /etc/koha/sites/$name on koha-remove --purge-all
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-11-28 23:57:28 UTC
Size:
1.47 KB
patch
obsolete
>From b48dabd61370104a86c26b5fbc5a247ef817f453 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@kallisti.net.nz> >Date: Sun, 23 Nov 2025 14:09:34 +1300 >Subject: [PATCH] Bug 16291: Remove /etc/koha/sites/$name on koha-remove > --purge-all > >A purge leaves behind some traces in /etc/koha/sites/$name, which >can cause problems because the directory isn't deleted. This deletes >the whole shebang when purge is requested. > >Test plan: >1. With the packages installed, make an instance. >2. Make a file in there, e.g. `# cat hello > /etc/koha/sites/$name/foo.txt` >3. Delete the instance with `koha-remove $name --purge-all` >4. Verify that `/etc/koha/sites/$name no longer exists > >Signed-off-by: David Nind <david@davidnind.com> >--- > debian/scripts/koha-remove | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/debian/scripts/koha-remove b/debian/scripts/koha-remove >index 486b3ff512..e14925867a 100755 >--- a/debian/scripts/koha-remove >+++ b/debian/scripts/koha-remove >@@ -144,6 +144,8 @@ eof > rm -r "/var/lib/koha/$name" > [ "$purgeall" = "1" ] && [ -d "/var/spool/koha/$name" ] && \ > rm -r "/var/spool/koha/$name" >+ [ "$purgeall" = "1" ] && [ -d "/etc/koha/sites/$name" ] && \ >+ rm -r "/etc/koha/sites/$name" > getent passwd "$name-koha" > /dev/null && deluser --quiet "$name-koha" > # in case the site has already been disabled, we don't want to break the loop now. > a2dissite "$name" > /dev/null 2>&1 || a2dissite "${name}.conf" > /dev/null 2>&1 || /bin/true >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16291
:
189899
| 190041