1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/xbackbone_ynh.git synced 2024-09-03 19:15:53 +02:00

i did jinx it, unterminated commands - should work now

This commit is contained in:
Hayden 2024-02-12 10:11:53 -08:00 committed by GitHub
parent e100289756
commit 623d0644b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,13 +23,13 @@ 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
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'
sed -i 's|$old_domain$old_path|$new_domain|' $install_dir/config.php
elif [ "$new_path" != "/" ] && [ "$old_path" == "/" ]; then
sed -i 's|$old_domain|$new_domain$new_path'
sed -i 's|$old_domain|$new_domain$new_path|' $install_dir/config.php
elif [ "$new_path" != "/" ] && [ "$old_path" != "/" ]; then
sed -i 's|$old_domain$old_path|$new_domain$new_path' $install_dir/config.php
sed -i 's|$old_domain$old_path|$new_domain$new_path|' $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