Restoring gpg key
This commit is contained in:
parent
3518ee9916
commit
77d1641fe3
|
@ -309,6 +309,21 @@ function restore_data {
|
||||||
any_key
|
any_key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function restore_data_remote {
|
||||||
|
any_key
|
||||||
|
}
|
||||||
|
|
||||||
|
function restore_gpg_key {
|
||||||
|
select_user
|
||||||
|
if [ ! $SELECTED_USERNAME ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
dialog --title "Restore GPG key for user $SELECTED_USERNAME" --msgbox "Plug in your USB keydrive" 6 40
|
||||||
|
clear
|
||||||
|
freedombone-recoverkey -u $SELECTED_USERNAME
|
||||||
|
any_key
|
||||||
|
}
|
||||||
|
|
||||||
function menu_top_level {
|
function menu_top_level {
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
@ -316,20 +331,22 @@ function menu_top_level {
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle "Freedombone Control Panel" \
|
dialog --backtitle "Freedombone Control Panel" \
|
||||||
--title "Control Panel" \
|
--title "Control Panel" \
|
||||||
--radiolist "Choose an operation:" 20 70 13 \
|
--radiolist "Choose an operation:" 20 70 15 \
|
||||||
1 "Backup data to USB drive" off \
|
1 "Backup data to USB drive" off \
|
||||||
2 "Restore data from USB drive" off \
|
2 "Restore data from USB drive" off \
|
||||||
3 "Add a user" off \
|
3 "Restore from remote backup" off \
|
||||||
4 "Delete a user" off \
|
4 "Add a user" off \
|
||||||
5 "Change user password or ssh public key" off \
|
5 "Delete a user" off \
|
||||||
6 "Add a user to a mailing list" off \
|
6 "Change user password" off \
|
||||||
7 "Add an email rule" off \
|
7 "Add a user to a mailing list" off \
|
||||||
8 "Block/Unblock an email address" off \
|
8 "Add an email rule" off \
|
||||||
9 "Block/Unblock email with subject text" off \
|
9 "Block/Unblock an email address" off \
|
||||||
10 "Change security settings" off \
|
10 "Block/Unblock email with subject text" off \
|
||||||
11 "Backup GPG key to USB drive (master keydrive)" off \
|
11 "Change security settings" off \
|
||||||
12 "Backup GPG key to USB drive (fragment keydrive)" off \
|
12 "Backup GPG key to USB drive (master keydrive)" off \
|
||||||
13 "Exit" on 2> $data
|
13 "Backup GPG key to USB drive (fragment keydrive)" off \
|
||||||
|
14 "Restore GPG key from USB drive" off \
|
||||||
|
15 "Exit" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
|
@ -338,17 +355,19 @@ function menu_top_level {
|
||||||
case $(cat $data) in
|
case $(cat $data) in
|
||||||
1) backup_data;;
|
1) backup_data;;
|
||||||
2) restore_data;;
|
2) restore_data;;
|
||||||
3) add_user;;
|
3) restore_data_remote;;
|
||||||
4) delete_user;;
|
4) add_user;;
|
||||||
5) change_password;;
|
5) delete_user;;
|
||||||
6) add_to_mailing_list;;
|
6) change_password;;
|
||||||
7) email_rule;;
|
7) add_to_mailing_list;;
|
||||||
8) block_unblock_email;;
|
8) email_rule;;
|
||||||
9) block_unblock_subject;;
|
9) block_unblock_email;;
|
||||||
10) freedombone-sec;;
|
10) block_unblock_subject;;
|
||||||
11) create_keydrive_master;;
|
11) freedombone-sec;;
|
||||||
12) create_keydrive_fragment;;
|
12) create_keydrive_master;;
|
||||||
13) break;;
|
13) create_keydrive_fragment;;
|
||||||
|
14) restore_gpg_key;;
|
||||||
|
15) break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue