From 2def70c44cc57b55ad183cdd71356cd3446bdb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leonard?= Date: Fri, 19 Feb 2021 11:11:36 +0100 Subject: [PATCH] #341 make log file available before the first start --- package/debian/postinst | 3 ++- package/docker/entrypoint | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package/debian/postinst b/package/debian/postinst index c5c0b8cd1..5e5de3654 100755 --- a/package/debian/postinst +++ b/package/debian/postinst @@ -83,7 +83,8 @@ case "$1" in # Chown definitions created by SBT Native Packager - chown cortex:cortex /var/log/cortex + touch /var/log/cortex/application.log + chown -R cortex:cortex /var/log/cortex chown root:cortex /etc/cortex/application.conf /etc/cortex/logback.xml chmod 0640 /etc/cortex/application.conf /etc/cortex/logback.xml diff --git a/package/docker/entrypoint b/package/docker/entrypoint index 9d3b00cee..68241d11b 100755 --- a/package/docker/entrypoint +++ b/package/docker/entrypoint @@ -137,6 +137,7 @@ fi echo config file is: cat "$CONFIG_FILE" +touch /var/log/cortex/application.log chown -R "$DAEMON_USER" /var/log/cortex chown -R "$DAEMON_USER" /etc/cortex chown -R "$DAEMON_USER" "$CONFIG_FILE"