1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00
This commit is contained in:
Éric Gaspar 2023-09-11 18:06:24 +02:00
parent d8fda2c36e
commit 74bf3c9f12

View file

@ -22,15 +22,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
#=================================================
# CHECK THE PATH
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=3
if [ -f "/etc/cron.d/$app" ]; then
ynh_secure_remove --file="/etc/cron.d/$app"
fi
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -60,6 +51,10 @@ ynh_add_fpm_config --usage=low --footprint=low
ynh_use_logrotate --non-append ynh_use_logrotate --non-append
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
# Create a dedicated Fail2Ban config # Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authenticate\: failed login attempt.*\"ip\"\:\"<HOST>\".*$" ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authenticate\: failed login attempt.*\"ip\"\:\"<HOST>\".*$"