From 6f9ab080d1b2bd62c01cc9ea3de36a68adc97b6c Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 10 Nov 2020 11:47:17 +0100 Subject: [PATCH] Fix change_url BaseUrl setting gets reverted to default if the wizard is not completed... --- scripts/change_url | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index f824a53..845c04d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -111,7 +111,12 @@ fi # Change the path in system.xml config file if [ $change_path -eq 1 ] then - ynh_replace_string --match_string="$old_path" --replace_string="$new_path" --target_file="/etc/jellyfin/system.xml" + # If the Startup Wizard was not complete, was reverted back to default when stopping the service + if grep -q "false" "/etc/jellyfin/system.xml"; then + ynh_replace_string --match_string="" --replace_string="$new_path" --target_file="/etc/jellyfin/system.xml" + else + ynh_replace_string --match_string="$old_path" --replace_string="$new_path" --target_file="/etc/jellyfin/system.xml" + fi fi #=================================================