1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dokuwiki_ynh.git synced 2024-09-03 18:26:20 +02:00

apply 'example_ynh': move fail2ban block

This commit is contained in:
Gofannon 2022-08-21 01:28:25 +02:00
parent ec68ea9c94
commit b312077566

View file

@ -91,13 +91,18 @@ chown -R $app:www-data "$final_path"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
# RESTORE FAIL2BAN CONFIGURATION
#=================================================
ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=5
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=7
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
ynh_systemd_action --action=restart --service_name=fail2ban
#=================================================
# REINSTALL DEPENDENCIES
@ -108,13 +113,8 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE FAIL2BAN CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=7
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
ynh_systemd_action --action=restart --service_name=fail2ban
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================