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

Fix change_url

BaseUrl setting gets reverted to default if the wizard is not completed...
This commit is contained in:
tituspijean 2020-11-10 11:47:17 +01:00
parent 6e4b91f34d
commit 6f9ab080d1

View file

@ -111,7 +111,12 @@ fi
# Change the path in system.xml config file
if [ $change_path -eq 1 ]
then
ynh_replace_string --match_string="<BaseUrl>$old_path</BaseUrl>" --replace_string="<BaseUrl>$new_path</BaseUrl>" --target_file="/etc/jellyfin/system.xml"
# If the Startup Wizard was not complete, <BaseUrl /> was reverted back to default when stopping the service
if grep -q "<IsStartupWizardCompleted>false</IsStartupWizardCompleted>" "/etc/jellyfin/system.xml"; then
ynh_replace_string --match_string="<BaseUrl />" --replace_string="<BaseUrl>$new_path</BaseUrl>" --target_file="/etc/jellyfin/system.xml"
else
ynh_replace_string --match_string="<BaseUrl>$old_path</BaseUrl>" --replace_string="<BaseUrl>$new_path</BaseUrl>" --target_file="/etc/jellyfin/system.xml"
fi
fi
#=================================================