From 74bf3c9f122c956e25be7e4bd9fe8078bd72142e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 11 Sep 2023 18:06:24 +0200 Subject: [PATCH] set cron --- scripts/upgrade | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d5acece..f509e13 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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" -#================================================= -# 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 #================================================= @@ -60,6 +51,10 @@ ynh_add_fpm_config --usage=low --footprint=low 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 ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authenticate\: failed login attempt.*\"ip\"\:\"\".*$"