1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/opensondage_ynh.git synced 2024-09-03 19:46:28 +02:00

Update change_url

This commit is contained in:
Éric Gaspar 2023-05-19 15:07:36 +02:00
parent 05d223ca39
commit df5b90d216

View file

@ -27,25 +27,6 @@ ynh_script_progression --message="Reconfiguring OpenSondage..."
ynh_replace_string --match_string="const APP_URL = '$old_domain';" --replace_string="const APP_URL = '$new_domain';" --target_file="$install_dir/app/inc/config.php"
#=================================================
# GENERIC FINALISATION
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..."
# Make app public if necessary
if [ $is_public -eq 1 ]
then
if [ "$path" == "/" ]; then
# If the path is /, clear it to prevent any error with the regex.
path=""
fi
# Modify the domain to be used in a regex
domain_regex=$(echo "$new_domain" | sed 's@-@.@g')
ynh_app_setting_set --app=$app --key=unprotected_regex --value="$domain_regex$path/create_poll.php?.*$","$domain_regex$path/adminstuds.php?.*"
fi
#=================================================
# END OF SCRIPT
#=================================================