1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rainloop_ynh.git synced 2024-09-03 20:16:18 +02:00

Replace properly path_url into the index for change_url

This commit is contained in:
Maniack Crudelis 2019-05-30 00:27:10 +02:00 committed by GitHub
parent aabd61c458
commit 405d49effd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,21 +86,7 @@ ynh_script_progression --message="Reconfiguring rainloop..." --weight=2
application_file="$final_path/app/data/_data_/_default_/configs/application.ini"
ynh_replace_string --match_string="default_domain = .^" --replace_string="default_domain = \"$new_domain\"" --target_file="$application_file"
if [ "$old_path" = "/" ] && [ "$new_path" = "/" ]
then
ynh_replace_string --match_string="$old_domain" --replace_string="$new_domain" --target_file="$final_path/index.php"
elif [ "$old_path" != "/" ] && [ "$new_path" != "/" ]
then
ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_domain$new_path" --target_file="$final_path/index.php"
elif [ "$old_path" != "/" ] && [ "$new_path" = "/" ]
then
ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_domain" --target_file="$final_path/index.php"
elif [ "$old_path" = "/" ] && [ "$new_path" != "/" ]
then
ynh_replace_string --match_string="$old_domain" --replace_string="$new_domain$new_path" --target_file="$final_path/index.php"
else
ynh_die --message="Error changing the URL"
fi
ynh_replace_string --match_string="$old_domain${old_path%/}" --replace_string="$new_domain${new_path%/}" --target_file="$final_path/index.php"
#=================================================
# GENERIC FINALISATION