From 2c20d71aa97c52d793368f0c0b22330ab5cb2ced Mon Sep 17 00:00:00 2001 From: Krakinou Date: Wed, 16 Mar 2022 00:19:55 +0100 Subject: [PATCH] fix folder settings --- scripts/upgrade | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f657dc0..7c607fe 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,10 +56,11 @@ then usermod -m -d /home/yunohost.app/$app $app fi -#10.17.0, 10.17.1 & 10.16.0 had a bug that overwrite the media path at installation. +#10.17.0, 10.17.1 & 10.16.0 had a bug that overwrite the media path at startup of the service. #https://github.com/UniversalMediaServer/UniversalMediaServer/issues/2864 #This will reinitialize it to /home/yunohost.multimedia/share -if [ $(ynh_app_upstream_version --manifest="/etc/yunohost/apps/$app/manifest.json") <= "10.17.0" ] +current_version=$(ynh_app_upstream_version --manifest="/etc/yunohost/apps/$app/manifest.json") +if [ $current_version == "10.17.0" ] || [ $current_version == "10.16.0" ] then ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" ynh_replace_string --match_string="folders =/opt/yunohost/$app,/home/yunohost.app/$app" \