summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Goodyear <g2boojum@gentoo.org>2002-09-23 00:30:51 +0000
committerGrant Goodyear <g2boojum@gentoo.org>2002-09-23 00:30:51 +0000
commitd30b1bf1902e4d160d01e72edaae7506f4d8bb17 (patch)
tree54da51b74532f1138f30536fb497b8d596abb78a /app-admin/sysklogd/files/syslog-cron
parentMoved sysklogd to app-admin (diff)
downloadgentoo-2-d30b1bf1902e4d160d01e72edaae7506f4d8bb17.tar.gz
gentoo-2-d30b1bf1902e4d160d01e72edaae7506f4d8bb17.tar.bz2
gentoo-2-d30b1bf1902e4d160d01e72edaae7506f4d8bb17.zip
Adding files. Oops.
Diffstat (limited to 'app-admin/sysklogd/files/syslog-cron')
-rw-r--r--app-admin/sysklogd/files/syslog-cron32
1 files changed, 32 insertions, 0 deletions
diff --git a/app-admin/sysklogd/files/syslog-cron b/app-admin/sysklogd/files/syslog-cron
new file mode 100644
index 000000000000..bd0a3647c2fd
--- /dev/null
+++ b/app-admin/sysklogd/files/syslog-cron
@@ -0,0 +1,32 @@
+#! /bin/sh
+
+# sysklogd Cron script to rotate system log files daily.
+#
+# If you want to rotate other logfiles daily, edit
+# this script. An easy way is to add them manually
+# or to add -a to syslogd-listfiles and add some grep
+# stuff
+#
+# Written by Martin Schulze <joey@debian.org>.
+# $Id: syslog-cron,v 1.1 2002/09/23 00:30:51 g2boojum Exp $
+
+cd /var/log
+for LOG in `syslogd-listfiles -a`
+do
+ if [ -f $LOG ]; then
+ savelog -g adm -m 640 -u root -c 7 $LOG >/dev/null
+ fi
+done
+
+for LOG in `syslogd-listfiles --auth -a`
+do
+ if [ -f $LOG ]; then
+ chown root.adm $LOG
+ chmod o-rwx $LOG
+ fi
+done
+
+# Restart syslogd
+#
+/usr/bin/killall -HUP syslogd
+