mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Add logrotate cron job & configuration for OpenShift
This commit is contained in:
parent
a569d3ffb8
commit
597a3ef2cb
2 changed files with 21 additions and 0 deletions
11
.openshift/cron/daily/logrotate
Executable file
11
.openshift/cron/daily/logrotate
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
pushd $OPENSHIFT_REPO_DIR
|
||||
|
||||
/usr/sbin/logrotate -s log/logrotate.status .openshift/logrotate
|
||||
|
||||
EXITVALUE=$?
|
||||
if [ $EXITVALUE != 0 ]; then
|
||||
echo "ALERT exited abnormally with [$EXITVALUE]" | /usr/bin/logshifter -tag logrotate
|
||||
fi
|
||||
exit 0
|
10
.openshift/logrotate
Normal file
10
.openshift/logrotate
Normal file
|
@ -0,0 +1,10 @@
|
|||
"log/*.log" {
|
||||
compress
|
||||
copytruncate
|
||||
create
|
||||
dateext
|
||||
maxage 30
|
||||
missingok
|
||||
rotate 4
|
||||
size 2
|
||||
}
|
Loading…
Add table
Reference in a new issue