Use logrotate to rotate the logs everytime it starts
authorJeremy Tan <[email protected]>
Mon, 30 Sep 2013 03:12:17 +0000 (11:12 +0800)
committerJeremy Tan <[email protected]>
Mon, 30 Sep 2013 03:12:17 +0000 (11:12 +0800)
server-configs/logrotate.d/mctxserv.conf [new file with mode: 0644]
server/run.sh

diff --git a/server-configs/logrotate.d/mctxserv.conf b/server-configs/logrotate.d/mctxserv.conf
new file mode 100644 (file)
index 0000000..8bbf99e
--- /dev/null
@@ -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
+}
+
index 5c0c61f..4318b39 100755 (executable)
Binary files a/server/run.sh and b/server/run.sh differ

UCC git Repository :: git.ucc.asn.au