1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
| -
!
-
|
|
!
-
!
-
!
-
!
-
!
-
!
-
!
-
!
-
!
-
!
-
!
-
!
-
!
-
!
-
!
|
MAIL_ADDRESS="[email protected]"
MAIL_TITLE="[$(hostname)] tripwire レポート(daily)"
EXE=/usr/sbin/tripwire
MAIL=/usr/bin/mail
PASS=hoge
NICE="0"
LINE="--------------------"
DATE_FORMAT="%m/%d-%H:%M:%S"
OUTFILE=`/bin/mktemp` || exit 1
/bin/echo -e "\n$LINE " `date +$DATE_FORMAT` " Start tripwire Scan $LINE" &>> $OUTFILE
/usr/bin/nice -n $NICE $EXE --check &>> $OUTFILE
/bin/echo -e "\n$LINE " `date +$DATE_FORMAT` " Start tripwire Update $LINE" &>> $OUTFILE
/usr/bin/nice -n $NICE $EXE --init -P $PASS &>> $OUTFILE
/bin/echo -e "\n$LINE " `date +$DATE_FORMAT` " End tripwire Update $LINE" &>> $OUTFILE
/bin/cat $OUTFILE | tr -d '\r' | $MAIL -s "$MAIL_TITLE" "$MAIL_ADDRESS"
/bin/rm -f $OUTFILE
|