Browse Source

check for /etc/{daily,weekly,monthly}.local and run if they exist

OPENBSD_2_0
david 29 years ago
parent
commit
68794b5596
3 changed files with 20 additions and 1 deletions
  1. +6
    -0
      src/etc/daily
  2. +8
    -1
      src/etc/monthly
  3. +6
    -0
      src/etc/weekly

+ 6
- 0
src/etc/daily View File

@ -6,6 +6,12 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local
host=`hostname -s`
echo "Subject: $host daily run output"
if [ -f /etc/daily.local ];then
echo ""
echo "Running daily.local:"
. /etc/daily.local
fi
echo ""
echo "Removing scratch and junk files:"
if [ -d /tmp -a ! -h /tmp ]; then


+ 8
- 1
src/etc/monthly View File

@ -6,6 +6,14 @@
host=`hostname -s`
echo "Subject: $host monthly run output"
if [ -f /etc/monthly.local ];then
echo ""
echo "Running monthly.local:"
. /etc/monthly.local
else
echo "Nothing to do!"
fi
# echo ""
# echo "Doing login accounting:"
# ac -p | sort -nr +1
@ -17,5 +25,4 @@ echo "Subject: $host monthly run output"
# aculog
# cron
echo "Nothing to do!"
#echo "."

+ 6
- 0
src/etc/weekly View File

@ -9,6 +9,12 @@ export PATH
host=`hostname -s`
echo "Subject: $host weekly run output"
if [ -f /etc/weekly.local ];then
echo ""
echo "Running weekly.local:"
. /etc/weekly.local
fi
#echo ""
#echo "Removing old .o files:"
#find /usr/src -name '*.o' -atime +21 -print -a -exec rm -f {} \;


Loading…
Cancel
Save