Add tripwire check as a cron job
This commit is contained in:
parent
4bf48b5801
commit
23f541964e
|
@ -75,10 +75,11 @@ function install_tripwire {
|
|||
echo 'EMAILREPORTLEVEL =3' >> /etc/tripwire/twcfg.txt
|
||||
echo 'REPORTLEVEL =3' >> /etc/tripwire/twcfg.txt
|
||||
echo 'SYSLOGREPORTING =false' >> /etc/tripwire/twcfg.txt
|
||||
echo 'MAILMETHOD =SMTP' >> /etc/tripwire/twcfg.txt
|
||||
echo 'MAILMETHOD =SENDMAIL' >> /etc/tripwire/twcfg.txt
|
||||
echo 'SMTPHOST =localhost' >> /etc/tripwire/twcfg.txt
|
||||
echo 'SMTPPORT =25' >> /etc/tripwire/twcfg.txt
|
||||
echo 'TEMPDIRECTORY =/tmp' >> /etc/tripwire/twcfg.txt
|
||||
echo 'MAILFROMADDRESS =tripwire@$(HOSTNAME)' >> /etc/tripwire/twcfg.txt
|
||||
|
||||
echo '
|
||||
|
||||
|
@ -117,6 +118,7 @@ function install_tripwire {
|
|||
sed -i 's|$(TWETC)/tw.pol.*||g' /etc/tripwire/twpol.txt
|
||||
# site key name
|
||||
sed -i 's|$(TWETC)/site.key|$(TWETC)/$(HOSTNAME)-site.key|g' /etc/tripwire/twpol.txt
|
||||
|
||||
# create the policy
|
||||
echo '
|
||||
|
||||
|
@ -137,6 +139,10 @@ function install_tripwire {
|
|||
|
||||
' | reset-tripwire
|
||||
|
||||
TRIPWIRE_MIN=$((1 + RANDOM % 49))
|
||||
TRIPWIRE_HOUR=$((1 + RANDOM % 6))
|
||||
echo "${TRIPWIRE_MIN} ${TRIPWIRE_HOUR} * * * root /usr/sbin/tripwire -m c" /etc/crontab
|
||||
|
||||
mark_completed $FUNCNAME
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue