blob: 5d8b97c4ce1bd2201f9c1748943fcb10eaf36e74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
set -ex
OUTPUT="${AUTOPKGTEST_ARTIFACTS:-.}/logrotate.txt"
LOG="/var/log/corosync/corosync.log"
logrotate --force --log "$OUTPUT" /etc/logrotate.d/corosync
cat "$OUTPUT"
grep -q "rotating log $LOG," "$OUTPUT"
[ -e "$LOG" ]
! [ -s "$LOG" ]
# Reload config to generate logs
corosync-cfgtool -R
grep -q 'Config reload requested' "$LOG"
|