Update of /cvsroot/devil-linux/build/scripts/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4347/scripts/scripts
Modified Files:
Tag: rel-1-2-patches
crontab
Added Files:
Tag: rel-1-2-patches
cron.interval
Log Message:
added script to execute files in /etc/cron.{hourly,daily,weekly,monthly}
--- NEW FILE: cron.interval ---
#!/bin/sh
# $Id: cron.interval,v 1.1.2.1 2004/06/27 14:34:43 smiley73 Exp $
#
# $Source: /cvsroot/devil-linux/build/scripts/scripts/cron.interval,v $
# $Revision: 1.1.2.1 $
# $Date: 2004/06/27 14:34:43 $
#
# http://www.devil-linux.org
#
# Written by: Heiko Zuerker <he...@de...>
if [ -z "$1" ]; then
echo "$0"
echo "ERROR"
echo "called without paramter"
echo "please add hourly, daily, weekly or monthly"
exit 1
fi
CRONDIR=/etc/cron.$1
if [ ! -d "$CRONDIR" ]; then
echo "$0"
echo "ERROR"
echo "directory $CRONDIR not found"
exit 1
fi
for JOB in $(ls $CRONDIR)
do
if [ -d "$CRONDIR/$JOB" ]; then
echo "$0"
echo "ERROR"
echo "$CRONDIR/$JOB is a directory, skipping"
continue
fi
if [ ! -x "$CRONDIR/$JOB" ]; then
echo "$0"
echo "ERROR"
echo "$CRONDIR/$JOB is not executable, skipping"
continue
fi
nice $CRONDIR/$JOB
done
Index: crontab
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/crontab,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -d -r1.4 -r1.4.2.1
--- crontab 22 Oct 2003 15:29:49 -0000 1.4
+++ crontab 27 Jun 2004 14:34:43 -0000 1.4.2.1
@@ -2,6 +2,10 @@
PATH=/usr/bin:/usr/sbin:/sbin:/bin
MAILTO=""
-#*/15 * * * * root test -x /samplepath/samplescript && /samplepath/samplescript
+59 * * * * root /usr/sbin/cron.interval hourly
+14 0 * * * root /usr/sbin/cron.interval daily
+29 0 * * 6 root /usr/sbin/cron.interval weekly
+44 0 1 * * root /usr/sbin/cron.interval monthly
+#*/15 * * * * root test -x /samplepath/samplescript && /samplepath/samplescript
#1 0 * * * root test -x /usr/sbin/logrotate && /usr/sbin/logrotate -s /var/log/logrotate.status /etc/logrotate.conf
#0 */1 * * * root test -x /usr/bin/freshclam && /usr/bin/freshclam --quiet -l /var/log/clam-update.log --daemon-notify
|