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

Simpler is better
This commit is contained in:
tituspijean 2020-11-10 14:50:59 +01:00
parent 6f9ab080d1
commit 58e8339ca3

View file

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