From 54fe09504c1d38053032bd99ef6f1ab1a6f34b08 Mon Sep 17 00:00:00 2001 From: Jeremy Tan Date: Mon, 30 Sep 2013 11:12:17 +0800 Subject: [PATCH] Use logrotate to rotate the logs everytime it starts --- server-configs/logrotate.d/mctxserv.conf | 14 ++++++++++++++ server/run.sh | Bin 2545 -> 2637 bytes 2 files changed, 14 insertions(+) create mode 100644 server-configs/logrotate.d/mctxserv.conf diff --git a/server-configs/logrotate.d/mctxserv.conf b/server-configs/logrotate.d/mctxserv.conf new file mode 100644 index 0000000..8bbf99e --- /dev/null +++ b/server-configs/logrotate.d/mctxserv.conf @@ -0,0 +1,14 @@ +/var/log/mctxserv*.log +{ + rotate 4 + daily + missingok + notifempty + compress + delaycompress + sharedscripts + postrotate + invoke-rc.d rsyslog rotate > /dev/null + endscript +} + diff --git a/server/run.sh b/server/run.sh index 5c0c61f1a5ceff63839c9305bbaae9035a70e941..4318b398230178066c2e385d7cc789ead34976e6 100755 GIT binary patch delta 106 zcmew;d{$(G3sYoJeo10UszOOdszOeFdNEgOaz?%aSTHj$9V}d2SzMBu3y}pXDS~Lw nO;gZMElJjgi|D23=O&j_6sH!I=_TjqrA>BV`mx!Pc?TN+KYu5R delta 20 ccmX>r@=