From 820c29f6a8ff26c4cf43c8539078ea6f2692667d Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Tue, 19 May 2020 14:26:56 +0200
Subject: [PATCH] Bug 25284: chown /var/log/koha log files on koha-create

To prevent Apache to create intranet-error.log and opac-error.log with
root permission we chown them after it has been restarted (and so
created them) when a new Koha instance is created

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
---
 debian/scripts/koha-create | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create
index 45c1ef644ff..b90e7d4e236 100755
--- a/debian/scripts/koha-create
+++ b/debian/scripts/koha-create
@@ -757,6 +757,8 @@ then
         # Get letsencrypt certificates
         letsencrypt_instance
     fi
+
+    chown $username:$username /var/log/koha/$name/*.log
 fi
 
 
-- 
2.26.2