mirror of
https://github.com/YunoHost-Apps/xbackbone_ynh.git
synced 2024-09-03 19:15:53 +02:00
Should work now (ive jinxed it havent i)
This commit is contained in:
parent
a0eefa185c
commit
e100289756
1 changed files with 11 additions and 3 deletions
|
@ -21,11 +21,19 @@ ynh_change_url_nginx_config
|
||||||
#
|
#
|
||||||
ynh_script_progression --message="Updating app configuration..." --weight=1
|
ynh_script_progression --message="Updating app configuration..." --weight=1
|
||||||
|
|
||||||
# Try a sed command? nowhere near finished I'll finish it soon enough
|
# this might be a roundabout way of doing it?
|
||||||
if [ "$new_path" == "/" ] && [ "$old_path" == "/" ]; then
|
if [ "$new_path" == "/" ] && [ "$old_path" == "/" ]; then
|
||||||
sed 's/${old_domain//\//\\\/}/${new_domain//\//\\\/}/g'
|
sed -i 's|$old_domain|$new_domain' $install_dir/config.php
|
||||||
|
elif [ "$new_path" == "/" ] && [ "$old_path" != "/" ]; then
|
||||||
|
sed -i 's|$old_domain$old_path|$new_domain'
|
||||||
|
elif [ "$new_path" != "/" ] && [ "$old_path" == "/" ]; then
|
||||||
|
sed -i 's|$old_domain|$new_domain$new_path'
|
||||||
|
elif [ "$new_path" != "/" ] && [ "$old_path" != "/" ]; then
|
||||||
|
sed -i 's|$old_domain$old_path|$new_domain$new_path' $install_dir/config.php
|
||||||
else
|
else
|
||||||
sed 's/${old_domain//\//\\\/}/
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Add table
Reference in a new issue