Deleted Added
full compact
periodic.sh (50479) periodic.sh (58767)
1#!/bin/sh -
2#
1#!/bin/sh -
2#
3# $FreeBSD: head/usr.sbin/periodic/periodic.sh 50479 1999-08-28 01:35:59Z peter $
3# $FreeBSD: head/usr.sbin/periodic/periodic.sh 58767 2000-03-29 07:05:29Z cpiazza $
4#
5# Run nightly periodic scripts
6#
7# usage: periodic { daily | weekly | monthly } - run standard periodic scripts
8# periodic /absolute/path/to/directory - run periodic scripts in dir
9#
10
11usage () {

--- 35 unchanged lines hidden (view full) ---

47 exit 1
48 fi
49 done
50
51 dirlist="$*"
52fi
53
54host=`hostname`
4#
5# Run nightly periodic scripts
6#
7# usage: periodic { daily | weekly | monthly } - run standard periodic scripts
8# periodic /absolute/path/to/directory - run periodic scripts in dir
9#
10
11usage () {

--- 35 unchanged lines hidden (view full) ---

47 exit 1
48 fi
49 done
50
51 dirlist="$*"
52fi
53
54host=`hostname`
55export host
55echo "Subject: $host $run run output"
56
57# Execute each executable file in the directory list. If the x bit is not
58# set, assume the user didn't really want us to muck with it (it's a
59# README file or has been disabled).
60
61for dir in $dirlist ; do
62 for file in $dir/* ; do
63 if [ -x $file -a ! -d $file ] ; then
64 $file
65 fi
66 done
67done
56echo "Subject: $host $run run output"
57
58# Execute each executable file in the directory list. If the x bit is not
59# set, assume the user didn't really want us to muck with it (it's a
60# README file or has been disabled).
61
62for dir in $dirlist ; do
63 for file in $dir/* ; do
64 if [ -x $file -a ! -d $file ] ; then
65 $file
66 fi
67 done
68done