1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/planka_ynh.git synced 2024-09-03 20:06:00 +02:00
This commit is contained in:
Éric Gaspar 2023-12-13 21:47:23 +01:00
parent 14264bd20e
commit 8841e1c0f7
5 changed files with 37 additions and 0 deletions

View file

@ -27,6 +27,21 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP FAIL2BAN CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================
# BACKUP SYSTEMD
#=================================================

View file

@ -48,6 +48,12 @@ ynh_add_systemd_config
yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log"
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
# Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: <ADDR>\)$"
#=================================================
# APP INITIAL CONFIGURATION
#=================================================

View file

@ -31,6 +31,10 @@ ynh_remove_nginx_config
ynh_remove_nodejs
ynh_remove_logrotate
ynh_remove_fail2ban_config
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -48,6 +48,12 @@ systemctl enable $app.service --quiet
yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
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
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -47,6 +47,12 @@ ynh_add_systemd_config
yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log"
# Use logrotate to manage application logfile(s)
ynh_use_logrotate --non-append
# Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: <ADDR>\)$"
#=================================================
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
#=================================================