2020-01-18 10:28:47 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
#=================================================
|
|
|
|
# MODIFY URL IN NGINX CONF
|
|
|
|
#=================================================
|
2022-08-31 02:25:01 +02:00
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
|
2020-01-18 10:28:47 +01:00
|
|
|
|
2024-01-15 22:17:38 +01:00
|
|
|
ynh_change_url_nginx_config
|
|
|
|
|
2020-01-18 10:28:47 +01:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
2022-08-11 13:20:52 +02:00
|
|
|
# MODIFY CONFIG
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Modify configuring..." --weight=1
|
|
|
|
|
|
|
|
ynh_replace_string --match_string="^FILES_SERVER_URL.*$" --replace_string="FILES_SERVER_URL=https://$new_domain$new_path/files" --target_file="$config_api_gateway"
|
|
|
|
ynh_store_file_checksum --file="$config_api_gateway"
|
|
|
|
|
2021-01-02 19:42:20 +01:00
|
|
|
#=================================================
|
|
|
|
# SETUP FAIL2BAN
|
2020-01-18 10:28:47 +01:00
|
|
|
#=================================================
|
2022-08-31 02:25:01 +02:00
|
|
|
ynh_script_progression --message="Configuring Fail2Ban..." --weight=1
|
2024-01-15 22:37:42 +01:00
|
|
|
|
2022-08-31 02:25:01 +02:00
|
|
|
# Create a dedicated Fail2Ban config
|
2021-05-09 14:50:38 +02:00
|
|
|
ynh_add_fail2ban_config --use_template
|
2020-01-18 10:28:47 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2020-12-23 15:19:09 +01:00
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|