From 6af23f3d4d4cabd6046e42cffd8de644854057fa Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sun, 27 Nov 2022 22:56:18 +0100 Subject: [PATCH] Correct bad log folder --- scripts/install | 2 +- scripts/upgrade | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 4f9a215..ece1c6a 100755 --- a/scripts/install +++ b/scripts/install @@ -206,7 +206,7 @@ mkdir -p /var/log/"$app" chown -R domoticz: /var/log/"$app" # Use logrotate to manage application logfile(s) -ynh_use_logrotate --logfile="/var/log/$app/$app" +ynh_use_logrotate --logfile="/var/log/$app/$app.log" [[ ! -z "$mqtt_domain" ]] && ynh_use_logrotate --logfile="/var/log/mosquitto/" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e6cb037..5bc2c61 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -147,6 +147,10 @@ if [ ! -z "$mqtt_domain" ]; then fi fi +#remove unwanted log folder +if [-d "/var/log/$app/$app" ]; then + rm -r "/var/log/$app/$app" +fi #================================================= # CREATE DEDICATED USER @@ -260,7 +264,7 @@ mkdir -p /var/log/"$app" chown -R domoticz: /var/log/"$app" # Use logrotate to manage app-specific logfile(s) -ynh_use_logrotate --logfile="/var/log/$app/$app" --non-append +ynh_use_logrotate --logfile="/var/log/$app/$app.log" --non-append [[ ! -z "$mqtt_domain" ]] && ynh_use_logrotate --logfile="/var/log/mosquitto/" --non-append