From 3e8e47ac63e6bdf6554f29e7e34407caaf5434d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 5 Aug 2019 15:36:02 +0200 Subject: [PATCH] Fix change-url script Use sed instead of ynh_replace_string for more flexibility --- scripts/change_url | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 8d8b37c..219cbd0 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -82,9 +82,9 @@ ynh_replace_string --match_string 'SITE_ROOT = "'"$old_path2"'"' --replace_strin ynh_replace_string --match_string 'MEDIA_URL = "'"$old_path2"'media/"' --replace_string 'MEDIA_URL = "'"$path_url2"'media/"' --target_file $final_path/conf/seahub_settings.py ynh_replace_string --match_string "LOGIN_URL = '${old_path2}accounts/login/'" --replace_string "LOGIN_URL = '${path_url2}accounts/login/'" --target_file $final_path/conf/seahub_settings.py ynh_replace_string --match_string ' = "seafile@'"$old_domain"'"' --replace_string ' = "seafile@'"$domain"'"' --target_file $final_path/conf/seahub_settings.py -sed --in-place "s@ALLOWED_HOSTS = \['${old_domain}'\]@ALLOWED_HOSTS = \['${domain}'\]@g" --target_file $final_path/conf/seahub_settings.py +sed --in-place "s@ALLOWED_HOSTS = \['${old_domain}'\]@ALLOWED_HOSTS = \['${domain}'\]@g" $final_path/conf/seahub_settings.py ynh_replace_string --match_string "REMOTE_USER_DOMAIN = '$old_domain'" --replace_string "REMOTE_USER_DOMAIN = '$domain'" --target_file $final_path/conf/seahub_settings.py -ynh_replace_string --match_string "REMOTE_USER_PROTECTED_PATH = ['$old_path', '$old_path/accounts/login']" --replace_string "REMOTE_USER_PROTECTED_PATH = ['$path_url', '$path_url/accounts/login']" --target_file $final_path/conf/seahub_settings.py +sed --in-place "s@REMOTE_USER_PROTECTED_PATH = \['$old_path', '$old_path/accounts/login'\]@REMOTE_USER_PROTECTED_PATH = \['$path_url', '$path_url/accounts/login'\]@g" $final_path/conf/seahub_settings.py ynh_script_progression --message="Updating seafile database" --weight=7