Ubuntu Pastebin

Paste from simon at Fri, 22 Sep 2017 18:02:12 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/var/log/aggregator-auth.log
/var/log/aggregator-syslog
{
	rotate 1
	daily
	missingok
	notifempty
	sharedscripts
	postrotate
		invoke-rc.d rsyslog rotate > /dev/null
	endscript
	# XXX: archive
	preremove
                umask 0027
                srcdir="$(dirname "$1")"
                destdir="$srcdir/archives/$(date -r "$1" +%Y/%m)"
                mkdir -p "$destdir"
                chown root:adm "$destdir"
                basename="$(basename "$1" | cut -d. -f1)"
                destfile="$destdir/$(date -r "$1" +%F)-$basename.gz"
		# logrotate wants to do the removal of "$1" itself
                touch "$destfile"
                chown root:adm "$destfile"
                nice gzip -c -9 "$1" > "$destfile"
	endscript
}
Download as text