1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/sonarr_ynh.git synced 2024-09-03 20:26:19 +02:00

hotfix: do not fail if config file is missing

This commit is contained in:
tituspijean 2024-04-06 20:49:08 +02:00
parent baa94d33bd
commit 4a50da79d3
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
2 changed files with 6 additions and 2 deletions

View file

@ -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"

View file

@ -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"