File: logrotate

package info (click to toggle)
corosync 3.1.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,432 kB
  • sloc: ansic: 44,925; sh: 11,532; makefile: 646
file content (19 lines) | stat: -rwxr-xr-x 350 bytes parent folder | download | duplicates (2)
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"