diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 23599e33..49ca9e06 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -309,6 +309,21 @@ function restore_data { 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 { while true do @@ -316,20 +331,22 @@ 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:" 20 70 13 \ + --radiolist "Choose an operation:" 20 70 15 \ 1 "Backup data to USB drive" off \ 2 "Restore data from USB drive" off \ - 3 "Add a user" off \ - 4 "Delete a user" off \ - 5 "Change user password or ssh public key" off \ - 6 "Add a user to a mailing list" off \ - 7 "Add an email rule" off \ - 8 "Block/Unblock an email address" off \ - 9 "Block/Unblock email with subject text" off \ - 10 "Change security settings" off \ - 11 "Backup GPG key to USB drive (master keydrive)" off \ - 12 "Backup GPG key to USB drive (fragment keydrive)" off \ - 13 "Exit" on 2> $data + 3 "Restore from remote backup" off \ + 4 "Add a user" off \ + 5 "Delete a user" off \ + 6 "Change user password" off \ + 7 "Add a user to a mailing list" off \ + 8 "Add an email rule" off \ + 9 "Block/Unblock an email address" off \ + 10 "Block/Unblock email with subject text" off \ + 11 "Change security settings" off \ + 12 "Backup GPG key to USB drive (master keydrive)" off \ + 13 "Backup GPG key to USB drive (fragment keydrive)" off \ + 14 "Restore GPG key from USB drive" off \ + 15 "Exit" on 2> $data sel=$? case $sel in 1) exit 1;; @@ -338,17 +355,19 @@ function menu_top_level { case $(cat $data) in 1) backup_data;; 2) restore_data;; - 3) add_user;; - 4) delete_user;; - 5) change_password;; - 6) add_to_mailing_list;; - 7) email_rule;; - 8) block_unblock_email;; - 9) block_unblock_subject;; - 10) freedombone-sec;; - 11) create_keydrive_master;; - 12) create_keydrive_fragment;; - 13) break;; + 3) restore_data_remote;; + 4) add_user;; + 5) delete_user;; + 6) change_password;; + 7) add_to_mailing_list;; + 8) email_rule;; + 9) block_unblock_email;; + 10) block_unblock_subject;; + 11) freedombone-sec;; + 12) create_keydrive_master;; + 13) create_keydrive_fragment;; + 14) restore_gpg_key;; + 15) break;; esac done }