mise à niveau log

This commit is contained in:
afornerot 2020-10-19 11:06:36 +02:00
parent 29bd42be09
commit 9f0b1ce883
2 changed files with 11 additions and 6 deletions

View File

@ -1,11 +1,13 @@
/var/www/html/nineschool/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
}

View File

@ -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