Option for resetting tripwire

This commit is contained in:
Bob Mottram 2015-08-15 14:19:00 +01:00
parent b2609f0f16
commit 6338256a27
1 changed files with 15 additions and 1 deletions

View File

@ -52,6 +52,7 @@ CURRENT_DIR=$(pwd)
REGENERATE_SSH_HOST_KEYS="no"
REGENERATE_DH_KEYS="no"
RESET_TRIPWIRE="no"
DH_KEYLENGTH=3072
function get_protocols_from_website {
@ -373,13 +374,22 @@ function regenerate_dh_keys {
fi
}
function reset_tripwire {
if [[ $RESET_TRIPWIRE == "yes" ]]; then
echo '
' | reset-tripwire
fi
}
function housekeeping {
cmd=(dialog --separate-output \
--backtitle "Freedombone Security Configuration" \
--title "Housekeeping options" \
--checklist "If you don't need to do any of these things then just press Enter:" 10 76 16)
options=(1 "Regenerate ssh host keys" off
2 "Regenerate Diffie-Hellman keys" off)
2 "Regenerate Diffie-Hellman keys" off
3 "Reset tripwire" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
@ -391,6 +401,9 @@ function housekeeping {
2)
REGENERATE_DH_KEYS="yes"
;;
3)
RESET_TRIPWIRE="yes"
;;
esac
done
}
@ -624,4 +637,5 @@ change_ssh_settings
change_xmpp_settings
regenerate_ssh_host_keys
regenerate_dh_keys
reset_tripwire
exit 0