diff --git a/scripts/change_url b/scripts/change_url index 0b00c85..8fcddde 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -32,7 +32,9 @@ ynh_change_url_nginx_config #================================================= # Add newline at end of file if required -sed -i -e '$a\' "$data_dir/config.xml" +if [ -e "$data_dir/config.xml" ]; then + sed -i -e '$a\' "$data_dir/config.xml" +fi ynh_add_config --template="config.xml" --destination="$data_dir/config.xml" diff --git a/scripts/upgrade b/scripts/upgrade index 7ae6a1c..6c97389 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -61,7 +61,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" +if [ -e "$data_dir/config.xml" ]; then + sed -i -e '$a\' "$data_dir/config.xml" +fi ynh_add_config --template="config.xml" --destination="$data_dir/config.xml"