1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

fix url on upgrade

This commit is contained in:
OniriCorpe 2024-02-11 22:30:36 +01:00
parent 47970df1b9
commit f8e834adb2

View file

@ -58,6 +58,16 @@ chmod 644 "/etc/cron.d/$app"
# Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authenticate\: failed login attempt.*\"ip\"\:\"<HOST>\".*$"
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
# fix the url if necessary (there should be no trailing slash)
if ! grep -q -e "'url' => 'https://$domain'," "$install_dir/config/local.config.php"; then
ynh_replace_string --match_string="'url' => 'https://.*'," --replace_string="'url' => 'https://$domain'," --target_file="$install_dir/config/local.config.php"
fi
#=================================================
# STORE THE CONFIG FILE CHECKSUM
#=================================================