tripwire qr code verification

This commit is contained in:
Bob Mottram 2017-08-05 13:15:35 +01:00
parent f2c17eddd5
commit 31e7b8d619
3 changed files with 11 additions and 8 deletions

View File

@ -58,7 +58,7 @@ function install_tripwire {
debconf-set-selections <<< "tripwire tripwire/use-sitekey boolean false" debconf-set-selections <<< "tripwire tripwire/use-sitekey boolean false"
debconf-set-selections <<< "tripwire tripwire/use-localkey boolean false" debconf-set-selections <<< "tripwire tripwire/use-localkey boolean false"
apt-get -yq install tripwire apt-get -yq install tripwire qrencode
apt-get -yq autoremove apt-get -yq autoremove
cd /etc/tripwire cd /etc/tripwire

View File

@ -1298,7 +1298,16 @@ function reset_tripwire {
' | reset-tripwire ' | reset-tripwire
echo '' echo ''
if [ -f /var/lib/tripwire/${HOSTNAME}.net.twd ]; then
DBHASH=$(sha512sum /var/lib/tripwire/${HOSTNAME}.net.twd)
echo "$DBHASH" | qrencode -t UTF8
echo ''
echo "$DBHASH"
echo ''
echo $'Tripwire is now reset' echo $'Tripwire is now reset'
else
echo $'ERROR: tripwire database was not created'
fi
any_key any_key
} }

View File

@ -109,10 +109,4 @@ fi
# If logging was left on then turn it off # If logging was left on then turn it off
${PROJECT_NAME}-logging off ${PROJECT_NAME}-logging off
if [ -f /usr/bin/reset-tripwire ]; then
echo '
' | reset-tripwire
fi
# deliberately there is no 'exit 0' here # deliberately there is no 'exit 0' here