mirror of
https://github.com/YunoHost-Apps/dex_ynh.git
synced 2024-09-03 18:26:22 +02:00
Remove fail2ban
This commit is contained in:
parent
8a87cfd22c
commit
1afb6b50d5
5 changed files with 12 additions and 12 deletions
|
@ -58,8 +58,8 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
# BACKUP FAIL2BAN CONFIGURATION
|
# BACKUP FAIL2BAN CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
#ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
||||||
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
#ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC BACKUP
|
# SPECIFIC BACKUP
|
||||||
|
|
|
@ -169,10 +169,10 @@ 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/dex/dex.log" --failregex="ldap: invalid password for user"
|
#ynh_add_fail2ban_config --logpath="/var/log/dex/dex.log" --failregex="ldap: invalid password for user"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
|
|
@ -101,10 +101,10 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE FAIL2BAN CONFIGURATION
|
# REMOVE FAIL2BAN CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC REMOVE
|
# SPECIFIC REMOVE
|
||||||
|
|
|
@ -75,11 +75,11 @@ chown -R $app:www-data "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# 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 --origin_path="/etc/fail2ban/jail.d/$app.conf"
|
#ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
|
||||||
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
|
#ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
|
||||||
ynh_systemd_action --action=restart --service_name=fail2ban
|
#ynh_systemd_action --action=restart --service_name=fail2ban
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
|
|
|
@ -157,10 +157,10 @@ 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/dex/dex.log" --failregex="ldap: invalid password for user"
|
#ynh_add_fail2ban_config --logpath="/var/log/dex/dex.log" --failregex="ldap: invalid password for user"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Add table
Reference in a new issue