More comprehensive tripwire reset

This commit is contained in:
Bob Mottram 2017-08-05 11:26:24 +01:00
parent 07942a701b
commit 0485e73a7d
1 changed files with 13 additions and 1 deletions

View File

@ -1280,8 +1280,20 @@ function reset_tripwire {
return return
fi fi
clear clear
echo $'Creating configuration...'
echo '
' | twadmin --create-cfgfile -S /etc/tripwire/${HOSTNAME}-site.key /etc/tripwire/twcfg.txt
echo $'Resetting policy...'
echo '
' | twadmin --create-polfile -S /etc/tripwire/${HOSTNAME}-site.key /etc/tripwire/twpol.txt
echo $'Creating tripwire database'
echo '
' | tripwire --init --cfgfile /etc/tripwire/tw.cfg --polfile /etc/tripwire/tw.pol --dbfile /var/lib/tripwire/${HOSTNAME}.twd
echo $'Resetting the Tripwire...' echo $'Resetting the Tripwire...'
echo ' ' echo ''
echo ' echo '
' | reset-tripwire ' | reset-tripwire