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

Trying to manage change_url

This commit is contained in:
yalh76 2019-02-13 19:21:57 +01:00
parent d65b500036
commit daad1682c8
2 changed files with 16 additions and 2 deletions

View file

@ -20,7 +20,7 @@
multi_instance=1 multi_instance=1
incorrect_path=1 incorrect_path=1
port_already_use=0 port_already_use=0
change_url=0 change_url=1
;;; Levels ;;; Levels
Level 1=auto Level 1=auto
Level 2=auto Level 2=auto

View file

@ -95,7 +95,21 @@ fi
application_file="$final_path/app/data/_data_/_default_/configs/application.ini" application_file="$final_path/app/data/_data_/_default_/configs/application.ini"
ynh_replace_string "default_domain = .^" "default_domain = \"$new_domain\"" "$application_file" ynh_replace_string "default_domain = .^" "default_domain = \"$new_domain\"" "$application_file"
ynh_replace_string "$old_domain$old_path" "$new_domain$new_path" "$final_path/index.php" if [ $old_path = "/" ] && [ $new_path = "/" ]
then
ynh_replace_string "$old_domain" "$new_domain" "$final_path/index.php"
elif [ $old_path != "/" ] && [ $new_path != "/" ]
then
ynh_replace_string "$old_domain$old_path" "$new_domain$new_path" "$final_path/index.php"
elif [ $old_path != "/" ] && [ $new_path = "/" ]
then
ynh_replace_string "$old_domain$old_path" "$new_domain" "$final_path/index.php"
elif [ $old_path = "/" ] && [ $new_path != "/" ]
then
ynh_replace_string "$old_domain" "$new_domain$new_path" "$final_path/index.php"
else
ynh_die "Error changing the URL"
fi
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION