mirror of
https://github.com/YunoHost-Apps/question2answer_ynh.git
synced 2024-09-03 20:16:07 +02:00
Apply suggestions from code review
Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>
This commit is contained in:
parent
681dd01171
commit
d7f1d45dda
4 changed files with 6 additions and 6 deletions
|
@ -338,9 +338,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP FAIL2BAN
|
# SETUP FAIL2BAN
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring Fail2ban..." --time --weight=1
|
ynh_script_progression --message="Configuring Fail2Ban..." --time --weight=1
|
||||||
|
|
||||||
# Create a dedicated Fail2ban config
|
# Create a dedicated Fail2Ban config
|
||||||
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
|
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -106,7 +106,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing Fail2ban configuration..." --time --weight=1
|
ynh_script_progression --message="Removing Fail2ban configuration..." --time --weight=1
|
||||||
|
|
||||||
# Remove the dedicated Fail2ban config
|
# Remove the dedicated Fail2Ban config
|
||||||
ynh_remove_fail2ban_config
|
ynh_remove_fail2ban_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -84,7 +84,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE FAIL2BAN CONFIGURATION
|
# RESTORE FAIL2BAN CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the Fail2ban configuration..." --time --weight=1
|
ynh_script_progression --message="Restoring the Fail2Ban configuration..." --time --weight=1
|
||||||
|
|
||||||
ynh_restore_file "/etc/fail2ban/jail.d/$app.conf"
|
ynh_restore_file "/etc/fail2ban/jail.d/$app.conf"
|
||||||
ynh_restore_file "/etc/fail2ban/filter.d/$app.conf"
|
ynh_restore_file "/etc/fail2ban/filter.d/$app.conf"
|
||||||
|
|
|
@ -201,9 +201,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE FAIL2BAN
|
# UPGRADE FAIL2BAN
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reconfiguring Fail2ban..." --time --weight=1
|
ynh_script_progression --message="Reconfiguring Fail2Ban..." --time --weight=1
|
||||||
|
|
||||||
# Create a dedicated Fail2ban config
|
# Create a dedicated Fail2Ban config
|
||||||
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
|
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue