Move resetting of the tripwire to the control panel
Since it's a commonly used function
This commit is contained in:
parent
f6f2bc51a5
commit
5896c10a1a
|
@ -450,6 +450,14 @@ function security_settings {
|
|||
any_key
|
||||
}
|
||||
|
||||
function reset_tripwire {
|
||||
clear
|
||||
echo '
|
||||
|
||||
' | reset-tripwire
|
||||
any_key
|
||||
}
|
||||
|
||||
function menu_backup_restore {
|
||||
while true
|
||||
do
|
||||
|
@ -545,14 +553,15 @@ function menu_top_level {
|
|||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle "Freedombone Control Panel" \
|
||||
--title "Control Panel" \
|
||||
--radiolist "Choose an operation:" 14 70 7 \
|
||||
--radiolist "Choose an operation:" 15 70 8 \
|
||||
1 "Backup and Restore" off \
|
||||
2 "Show SIP Phone Extensions" off \
|
||||
3 "Logging on/off" off \
|
||||
4 "Manage Users" off \
|
||||
5 "Email Filtering Rules" off \
|
||||
6 "Security Settings" off \
|
||||
7 "Exit" on 2> $data
|
||||
7 "Reset Tripwire" off \
|
||||
8 "Exit" on 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 1;;
|
||||
|
@ -565,7 +574,8 @@ function menu_top_level {
|
|||
4) menu_users;;
|
||||
5) menu_email;;
|
||||
6) security_settings;;
|
||||
7) break;;
|
||||
7) reset_tripwire;;
|
||||
8) break;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ CURRENT_DIR=$(pwd)
|
|||
|
||||
REGENERATE_SSH_HOST_KEYS="no"
|
||||
REGENERATE_DH_KEYS="no"
|
||||
RESET_TRIPWIRE="no"
|
||||
DH_KEYLENGTH=2048
|
||||
|
||||
function get_protocols_from_website {
|
||||
|
@ -376,25 +375,13 @@ function regenerate_dh_keys {
|
|||
fi
|
||||
}
|
||||
|
||||
function reset_tripwire {
|
||||
if [[ $RESET_TRIPWIRE != "yes" ]]; then
|
||||
return
|
||||
fi
|
||||
clear
|
||||
echo '
|
||||
|
||||
' | reset-tripwire
|
||||
exit 0
|
||||
}
|
||||
|
||||
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
|
||||
3 "Reset tripwire" off)
|
||||
2 "Regenerate Diffie-Hellman keys" off)
|
||||
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
|
||||
clear
|
||||
for choice in $choices
|
||||
|
@ -406,12 +393,8 @@ function housekeeping {
|
|||
2)
|
||||
REGENERATE_DH_KEYS="yes"
|
||||
;;
|
||||
3)
|
||||
RESET_TRIPWIRE="yes"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
reset_tripwire
|
||||
}
|
||||
|
||||
function import_settings {
|
||||
|
|
Loading…
Reference in New Issue