From d40a7035212b2adf9cfb1229d5808abd5f1da9c3 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 27 Jul 2022 07:28:24 +0200 Subject: [PATCH] Setup logrotate --- scripts/install | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/install b/scripts/install index 5590651..218363f 100644 --- a/scripts/install +++ b/scripts/install @@ -158,6 +158,16 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil set_permissions +#================================================= +# SETUP LOGROTATE +#================================================= + +ynh_script_progression --message="Configuring log rotation..." +# Use logrotate to manage application logfile(s) +touch "$final_path/var/logs/prod.log" +ynh_use_logrotate "$final_path/var/logs/prod.log" +chown $app:www-data "$final_path/var/logs/prod.log" + #================================================= # SETUP FAIL2BAN #=================================================