Bugzilla – Attachment 189899 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.42 KB, created by
Robin Sheat
on 2025-11-23 01:15:58 UTC
(
hide
)
Description:
Bug 16291: remove /etc/koha/sites/$name on koha-remove --purge-all
Filename:
MIME Type:
Creator:
Robin Sheat
Created:
2025-11-23 01:15:58 UTC
Size:
1.42 KB
patch
obsolete
>From 05f5a849ea203d163360e31c6d30aeffd8ff7a4d 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 >--- > 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.51.0
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