Back to hostname

This commit is contained in:
Bob Mottram 2018-01-20 18:30:26 +00:00
parent ff55d42e29
commit c9ee053494
1 changed files with 4 additions and 4 deletions

View File

@ -154,7 +154,7 @@ function any_key_verify {
dialog --title $"Check tripwire" \
--msgbox $"\nThe hash should not contain any spaces" 10 40
else
DBHASH=$(sha512sum /var/lib/tripwire/${PROJECT_NAME}.twd | awk -F ' ' '{print $1}')
DBHASH=$(sha512sum /var/lib/tripwire/${HOSTNAME}.twd | awk -F ' ' '{print $1}')
if [[ "$DBHASH" == "$GIVEN_HASH" ]]; then
dialog --title $"Check tripwire" \
--msgbox $"\nSuccess\n\nThe hash you gave matches the current tripwire database" 10 40
@ -1305,7 +1305,7 @@ function security_settings {
}
function show_tripwire_verification_code {
if [ ! -f /var/lib/tripwire/${PROJECT_NAME}.twd ]; then
if [ ! -f /var/lib/tripwire/${HOSTNAME}.twd ]; then
return
fi
clear
@ -1346,7 +1346,7 @@ function reset_tripwire {
echo $'Creating tripwire database'
echo '
' | tripwire --init --cfgfile /etc/tripwire/tw.cfg --polfile /etc/tripwire/tw.pol --dbfile /var/lib/tripwire/${PROJECT_NAME}.twd
' | tripwire --init --cfgfile /etc/tripwire/tw.cfg --polfile /etc/tripwire/tw.pol --dbfile /var/lib/tripwire/${HOSTNAME}.twd
echo $'Resetting the Tripwire...'
echo ''
echo '
@ -1361,7 +1361,7 @@ function reset_tripwire {
systemctl restart nginx
fi
if [ -f /var/lib/tripwire/${PROJECT_NAME}.twd ]; then
if [ -f /var/lib/tripwire/${HOSTNAME}.twd ]; then
show_tripwire_verification_code
echo $'Tripwire is now reset. Take a note of the above hash, or record'
echo $'the QR code using a mobile device. This will enable you to independently'