From b6f5b0ac0fee593bce11fcc8286a5f620dc5bbec Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 4 Apr 2024 23:09:06 +0200 Subject: [PATCH] Circumvent missing new line in config.xml Co-authored-by: Salamandar <6552989+Salamandar@users.noreply.github.com> --- scripts/change_url | 5 ++++- scripts/upgrade | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index b7bcef0..0b00c85 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -31,7 +31,10 @@ ynh_change_url_nginx_config # UPDATE CONFIGURATION FILE #================================================= -ynh_exec_warn_less ynh_add_config --template="config.xml" --destination="$data_dir/config.xml" +# Add newline at end of file if required +sed -i -e '$a\' "$data_dir/config.xml" + +ynh_add_config --template="config.xml" --destination="$data_dir/config.xml" chown "$app:$app" "$data_dir/config.xml" diff --git a/scripts/upgrade b/scripts/upgrade index c1b1b36..7ae6a1c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,6 +60,9 @@ ynh_use_logrotate --non-append --logfile="/var/log/$app/" #================================================= ynh_script_progression --message="Configuring Radarr..." --weight=2 +# Add newline at end of file if required +sed -i -e '$a\' "$data_dir/config.xml" + ynh_add_config --template="config.xml" --destination="$data_dir/config.xml" chmod 750 "$data_dir"