Created
October 13, 2014 09:34
-
-
Save tfheen/22deaa97a2105f59fd2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| TMPFILE=$(mktemp --tmpdir logrotate.XXXXXXXXXX) | |
| cleanup() { | |
| rm -f $TMPFILE | |
| } | |
| trap cleanup EXIT | |
| test -x /usr/sbin/logrotate || exit 0 | |
| /usr/sbin/logrotate -v /etc/logrotate.conf > $TMPFILE 2>&1 | |
| if grep -qs "gzip: stdin" $TMPFILE; then | |
| cat $TMPFILE | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment