From c35ddd8e0d1e270cde7d06f3b9430f211f5de084 Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 19 Oct 2020 11:06:14 +0200 Subject: [PATCH] =?UTF-8?q?mise=20=C3=A0=20niveau=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logrotate/nineskeletor | 14 ++++++++------ src/nineskeletor-1.0/scripts/reconfigure.sh | 3 +++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/logrotate/nineskeletor b/logrotate/nineskeletor index e9614c8..3357985 100644 --- a/logrotate/nineskeletor +++ b/logrotate/nineskeletor @@ -1,11 +1,13 @@ /var/www/html/nineskeletor/var/log/*.log { - maxsize 50M + su root www-data daily - missingok - rotate 5 + rotate 7 + size 900 + maxage 7 compress - notifempty - nocreate - su www-data + dateext + dateformat -%Y%m%d + missingok + create 644 www-data www-data } diff --git a/src/nineskeletor-1.0/scripts/reconfigure.sh b/src/nineskeletor-1.0/scripts/reconfigure.sh index b832d91..d1484d8 100755 --- a/src/nineskeletor-1.0/scripts/reconfigure.sh +++ b/src/nineskeletor-1.0/scripts/reconfigure.sh @@ -9,6 +9,9 @@ DIR=$(pwd) # Déclaration d'un proxy . $DIR/scripts/proxy.sh +# Suppression des logs trop ancien +find $DIR/var/log -mindepth 1 -mtime +7 -delete + # Mise en place du fichier d'environnement model yes 2>/dev/null | cp $DIR/scripts/.env.model $DIR/.env