mirror of
https://github.com/YunoHost-Apps/xbackbone_ynh.git
synced 2024-09-03 19:15:53 +02:00
beyond me, if you have a better alternative lmk
This commit is contained in:
parent
bb83443137
commit
5832e47f85
1 changed files with 0 additions and 20 deletions
|
@ -16,26 +16,6 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
|
||||||
|
|
||||||
ynh_change_url_nginx_config
|
ynh_change_url_nginx_config
|
||||||
|
|
||||||
#
|
|
||||||
# MODIFY URL IN APP CONFIG
|
|
||||||
#
|
|
||||||
ynh_script_progression --message="Updating app configuration..." --weight=1
|
|
||||||
|
|
||||||
# this might be a roundabout way of doing it?
|
|
||||||
if [ "$new_path" == "/" ] && [ "$old_path" == "/" ]; then
|
|
||||||
sed -i 's|$old_domain|$new_domain|' $install_dir/config.php
|
|
||||||
elif [ "$new_path" == "/" ] && [ "$old_path" != "/" ]; then
|
|
||||||
sed -i 's|$old_domain${old_path:0:-1}|$new_domain|' $install_dir/config.php
|
|
||||||
elif [ "$new_path" != "/" ] && [ "$old_path" == "/" ]; then
|
|
||||||
sed -i 's|$old_domain|$new_domain${old_path:0:-1}|' $install_dir/config.php
|
|
||||||
elif [ "$new_path" != "/" ] && [ "$old_path" != "/" ]; then
|
|
||||||
# Works
|
|
||||||
sed -i 's|$old_domain${old_path:0:-1}|$new_domain${old_path:0:-1}|' $install_dir/config.php
|
|
||||||
else
|
|
||||||
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