mirror of
https://github.com/YunoHost-Apps/xbackbone_ynh.git
synced 2024-09-03 19:15:53 +02:00
Update change_url
tested 1 and it works, working on the rest.
This commit is contained in:
parent
623d0644b5
commit
7d524c2c27
1 changed files with 5 additions and 4 deletions
|
@ -25,14 +25,15 @@ ynh_script_progression --message="Updating app configuration..." --weight=1
|
||||||
if [ "$new_path" == "/" ] && [ "$old_path" == "/" ]; then
|
if [ "$new_path" == "/" ] && [ "$old_path" == "/" ]; then
|
||||||
sed -i 's|$old_domain|$new_domain|' $install_dir/config.php
|
sed -i 's|$old_domain|$new_domain|' $install_dir/config.php
|
||||||
elif [ "$new_path" == "/" ] && [ "$old_path" != "/" ]; then
|
elif [ "$new_path" == "/" ] && [ "$old_path" != "/" ]; then
|
||||||
sed -i 's|$old_domain$old_path|$new_domain|' $install_dir/config.php
|
sed -i 's|$old_domain${old_path%?}|$new_domain|' $install_dir/config.php
|
||||||
elif [ "$new_path" != "/" ] && [ "$old_path" == "/" ]; then
|
elif [ "$new_path" != "/" ] && [ "$old_path" == "/" ]; then
|
||||||
sed -i 's|$old_domain|$new_domain$new_path|' $install_dir/config.php
|
sed -i 's|$old_domain|$new_domain${new_path%?}|' $install_dir/config.php
|
||||||
elif [ "$new_path" != "/" ] && [ "$old_path" != "/" ]; then
|
elif [ "$new_path" != "/" ] && [ "$old_path" != "/" ]; then
|
||||||
sed -i 's|$old_domain$old_path|$new_domain$new_path|' $install_dir/config.php
|
# Works
|
||||||
|
sed -i 's|$old_domain${old_path%?}|$new_domain${new_path%?}|' $install_dir/config.php
|
||||||
else
|
else
|
||||||
ynh_print_warn --message="Didn't match a result for old/new paths. Attempting subdomain config."
|
ynh_print_warn --message="Didn't match a result for old/new paths. Attempting subdomain config."
|
||||||
sed -i 's|$old_domain|$new_domain' $install_dir/config.php
|
sed -i 's|$old_domain|$new_domain|' $install_dir/config.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue