[squid-logrotate-script.sh] ajout du hostname
darcs-hash:20090304160331-bd074-e19c904d555ea047224bb3680dacc5888aa6b7d9.gz
This commit is contained in:
parent
aa5e8cdc52
commit
ee14cc246e
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
umask 0177
|
||||
|
||||
logs_src=/var/log/squid
|
||||
logs_dst=/home/squid/logs
|
||||
logs_dst="/home/squid/`hostname`/logs"
|
||||
|
||||
dernier_fichier=$logs_src/$(ls -tr "$logs_src" | grep access.log | head -1)
|
||||
|
||||
|
@ -13,4 +13,4 @@ date=$(date -d "1970-01-01 $timestamp sec" +"%Y-%m-%d")
|
|||
|
||||
install -o root -g root -m 0400 -p "$dernier_fichier" "$logs_dst/access.log.$date.bz2"
|
||||
|
||||
find "$logs_dst" -mtime +365 -delete
|
||||
#find "$logs_dst" -mtime +365 -delete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue