Created
May 8, 2015 17:41
-
-
Save teddychan/e03311114ee9400f913b 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
/log/mongod.log { | |
daily | |
rotate 20 | |
missingok | |
compress | |
delaycompress | |
notifempty | |
dateformat .%Y-%m-%dT%s | |
create 640 mongod mongod | |
sharedscripts | |
postrotate | |
/bin/kill -SIGUSR1 `cat /var/run/mongodb/mongod.pid 2>/dev/null` >/dev/null 2>&1 | |
find /log -type f -size 0 -regextype posix-awk -regex "^\/log\/mongod\.log\.[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}-[0-9]{2}-[0-9]{2}$" -execdir rm {} \; >/dev/null 2>&1 | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment