From ec1c6464ea253ba35d297abf5b22933b01dc3fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leonard?= Date: Tue, 9 Mar 2021 08:09:20 +0100 Subject: [PATCH] #1789 make sure application.log is created after the installation process --- package/debian/postinst | 1 + package/rpm/post | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package/debian/postinst b/package/debian/postinst index dd4e2d9870..a1bae2b3c1 100755 --- a/package/debian/postinst +++ b/package/debian/postinst @@ -86,6 +86,7 @@ case "$1" in fi # Chown definitions created by SBT Native Packager + mkdir -p /var/log/thehive touch /var/log/thehive/application.log chown -R thehive:thehive /var/log/thehive chown root:thehive /etc/thehive/application.conf /etc/thehive/logback.xml /etc/thehive/secret.conf diff --git a/package/rpm/post b/package/rpm/post index 46e824ed8c..13f6ff462d 100644 --- a/package/rpm/post +++ b/package/rpm/post @@ -10,4 +10,8 @@ chown root:thehive /etc/thehive/application.conf /etc/thehive/logback.xml /etc/t chmod 0640 /etc/thehive/application.conf /etc/thehive/logback.xml /etc/thehive/secret.conf if test -x /bin/systemctl; then /bin/systemctl daemon-reload || /bin/true - fi \ No newline at end of file + fi + +mkdir -p /var/log/thehive +touch /var/log/thehive/application.log +chown -R thehive:thehive /var/log/thehive \ No newline at end of file