diff --git a/scripts/install b/scripts/install index 2e4922e..aa7de30 100644 --- a/scripts/install +++ b/scripts/install @@ -152,6 +152,8 @@ ynh_print_info "Configuring log rotation..." ### - And the section "SETUP LOGROTATE" in the upgrade script # Use logrotate to manage application logfile(s) +# We gotta create the file explicitly to avoid triggering https://github.com/YunoHost/issues/issues/1390 +touch "$final_path/data/log.txt" ynh_use_logrotate "$final_path/data/log.txt" diff --git a/scripts/upgrade b/scripts/upgrade index 9aa3b3c..3205547 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -130,7 +130,11 @@ ynh_print_info "Upgrading logrotate configuration..." # Use logrotate to manage app-specific logfile(s) # Temporary fix for .txt log file and ynh_use_logrotate -ln -s "$final_path/data/log.txt" "$final_path/data/log.log" +if [ -d "$final_path/data/log.txt" ] +then + rm -r "$final_path/data/log.txt" + touch "$final_path/data/log.txt" +fi ynh_use_logrotate --non-append #=================================================