| 
				
			 | 
			
			
				@@ -366,30 +366,21 @@ function restore_gpg_key { 
			 | 
		
	
		
			
			| 
				366
			 | 
			
				366
			 | 
			
			
				     any_key 
			 | 
		
	
		
			
			| 
				367
			 | 
			
				367
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				368
			 | 
			
				368
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				369
			 | 
			
				
			 | 
			
			
				-function menu_top_level { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				369
			 | 
			
			
				+function menu_backup_restore { 
			 | 
		
	
		
			
			| 
				370
			 | 
			
				370
			 | 
			
			
				     while true 
			 | 
		
	
		
			
			| 
				371
			 | 
			
				371
			 | 
			
			
				     do 
			 | 
		
	
		
			
			| 
				372
			 | 
			
				372
			 | 
			
			
				         data=$(tempfile 2>/dev/null) 
			 | 
		
	
		
			
			| 
				373
			 | 
			
				373
			 | 
			
			
				         trap "rm -f $data" 0 1 2 5 15 
			 | 
		
	
		
			
			| 
				374
			 | 
			
				374
			 | 
			
			
				         dialog --backtitle "Freedombone Control Panel" \ 
			 | 
		
	
		
			
			| 
				375
			 | 
			
				
			 | 
			
			
				-               --title "Control Panel" \ 
			 | 
		
	
		
			
			| 
				376
			 | 
			
				
			 | 
			
			
				-               --radiolist "Choose an operation:" 24 70 16 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				375
			 | 
			
			
				+               --title "Backup and Restore" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				376
			 | 
			
			
				+               --radiolist "Choose an operation:" 14 70 7 \ 
			 | 
		
	
		
			
			| 
				377
			 | 
			
				377
			 | 
			
			
				                1 "Backup data to USB drive" off \ 
			 | 
		
	
		
			
			| 
				378
			 | 
			
				
			 | 
			
			
				-               2 "Restore data from USB drive" off \ 
			 | 
		
	
		
			
			| 
				379
			 | 
			
				
			 | 
			
			
				-               3 "Restore from remote backup" off \ 
			 | 
		
	
		
			
			| 
				380
			 | 
			
				
			 | 
			
			
				-               4 "Add a user" off \ 
			 | 
		
	
		
			
			| 
				381
			 | 
			
				
			 | 
			
			
				-               5 "Delete a user" off \ 
			 | 
		
	
		
			
			| 
				382
			 | 
			
				
			 | 
			
			
				-               6 "Change user password" off \ 
			 | 
		
	
		
			
			| 
				383
			 | 
			
				
			 | 
			
			
				-               7 "Add a user to a mailing list" off \ 
			 | 
		
	
		
			
			| 
				384
			 | 
			
				
			 | 
			
			
				-               8 "Add an email rule" off \ 
			 | 
		
	
		
			
			| 
				385
			 | 
			
				
			 | 
			
			
				-               9 "Block/Unblock an email address" off \ 
			 | 
		
	
		
			
			| 
				386
			 | 
			
				
			 | 
			
			
				-               10 "Block/Unblock email with subject text" off \ 
			 | 
		
	
		
			
			| 
				387
			 | 
			
				
			 | 
			
			
				-               11 "Change security settings" off \ 
			 | 
		
	
		
			
			| 
				388
			 | 
			
				
			 | 
			
			
				-               12 "Backup GPG key to USB drive (master keydrive)" off \ 
			 | 
		
	
		
			
			| 
				389
			 | 
			
				
			 | 
			
			
				-               13 "Backup GPG key to USB drive (fragment keydrive)" off \ 
			 | 
		
	
		
			
			| 
				390
			 | 
			
				
			 | 
			
			
				-               14 "Restore GPG key from USB drive" off \ 
			 | 
		
	
		
			
			| 
				391
			 | 
			
				
			 | 
			
			
				-               15 "Turn logging on/off" off \ 
			 | 
		
	
		
			
			| 
				392
			 | 
			
				
			 | 
			
			
				-               16 "Exit" on 2> $data 
			 | 
		
	
		
			
			| 
				
			 | 
			
				378
			 | 
			
			
				+               2 "Restore GPG key from USB keydrive" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				379
			 | 
			
			
				+               3 "Restore data from USB drive" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				380
			 | 
			
			
				+               4 "Restore from remote backup" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				381
			 | 
			
			
				+               5 "Backup GPG key to USB (master keydrive)" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				382
			 | 
			
			
				+               6 "Backup GPG key to USB (fragment keydrive)" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				383
			 | 
			
			
				+               7 "Back to main menu" on 2> $data 
			 | 
		
	
		
			
			| 
				393
			 | 
			
				384
			 | 
			
			
				         sel=$? 
			 | 
		
	
		
			
			| 
				394
			 | 
			
				385
			 | 
			
			
				         case $sel in 
			 | 
		
	
		
			
			| 
				395
			 | 
			
				386
			 | 
			
			
				             1) exit 1;; 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -397,21 +388,98 @@ function menu_top_level { 
			 | 
		
	
		
			
			| 
				397
			 | 
			
				388
			 | 
			
			
				         esac 
			 | 
		
	
		
			
			| 
				398
			 | 
			
				389
			 | 
			
			
				         case $(cat $data) in 
			 | 
		
	
		
			
			| 
				399
			 | 
			
				390
			 | 
			
			
				             1) backup_data;; 
			 | 
		
	
		
			
			| 
				400
			 | 
			
				
			 | 
			
			
				-            2) restore_data;; 
			 | 
		
	
		
			
			| 
				401
			 | 
			
				
			 | 
			
			
				-            3) restore_data_remote;; 
			 | 
		
	
		
			
			| 
				402
			 | 
			
				
			 | 
			
			
				-            4) add_user;; 
			 | 
		
	
		
			
			| 
				403
			 | 
			
				
			 | 
			
			
				-            5) delete_user;; 
			 | 
		
	
		
			
			| 
				404
			 | 
			
				
			 | 
			
			
				-            6) change_password;; 
			 | 
		
	
		
			
			| 
				405
			 | 
			
				
			 | 
			
			
				-            7) add_to_mailing_list;; 
			 | 
		
	
		
			
			| 
				406
			 | 
			
				
			 | 
			
			
				-            8) email_rule;; 
			 | 
		
	
		
			
			| 
				407
			 | 
			
				
			 | 
			
			
				-            9) block_unblock_email;; 
			 | 
		
	
		
			
			| 
				408
			 | 
			
				
			 | 
			
			
				-            10) block_unblock_subject;; 
			 | 
		
	
		
			
			| 
				409
			 | 
			
				
			 | 
			
			
				-            11) freedombone-sec;; 
			 | 
		
	
		
			
			| 
				410
			 | 
			
				
			 | 
			
			
				-            12) create_keydrive_master;; 
			 | 
		
	
		
			
			| 
				411
			 | 
			
				
			 | 
			
			
				-            13) create_keydrive_fragment;; 
			 | 
		
	
		
			
			| 
				412
			 | 
			
				
			 | 
			
			
				-            14) restore_gpg_key;; 
			 | 
		
	
		
			
			| 
				413
			 | 
			
				
			 | 
			
			
				-            15) logging_on_off;; 
			 | 
		
	
		
			
			| 
				414
			 | 
			
				
			 | 
			
			
				-            16) break;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				391
			 | 
			
			
				+            2) restore_gpg_key;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				392
			 | 
			
			
				+            3) restore_data;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				393
			 | 
			
			
				+            4) restore_data_remote;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				394
			 | 
			
			
				+            5) create_keydrive_master;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				395
			 | 
			
			
				+            6) create_keydrive_fragment;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				396
			 | 
			
			
				+            7) break;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				397
			 | 
			
			
				+        esac 
			 | 
		
	
		
			
			| 
				
			 | 
			
				398
			 | 
			
			
				+    done 
			 | 
		
	
		
			
			| 
				
			 | 
			
				399
			 | 
			
			
				+} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				400
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				401
			 | 
			
			
				+function menu_email { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				402
			 | 
			
			
				+    while true 
			 | 
		
	
		
			
			| 
				
			 | 
			
				403
			 | 
			
			
				+    do 
			 | 
		
	
		
			
			| 
				
			 | 
			
				404
			 | 
			
			
				+        data=$(tempfile 2>/dev/null) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				405
			 | 
			
			
				+        trap "rm -f $data" 0 1 2 5 15 
			 | 
		
	
		
			
			| 
				
			 | 
			
				406
			 | 
			
			
				+        dialog --backtitle "Freedombone Control Panel" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				407
			 | 
			
			
				+               --title "Email Filtering Rules" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				408
			 | 
			
			
				+               --radiolist "Choose an operation:" 12 70 5 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				409
			 | 
			
			
				+               1 "Add a user to a mailing list" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				410
			 | 
			
			
				+               2 "Add an email rule" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				411
			 | 
			
			
				+               3 "Block/Unblock an email address" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				412
			 | 
			
			
				+               4 "Block/Unblock email with subject text" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				413
			 | 
			
			
				+               5 "Back to main menu" on 2> $data 
			 | 
		
	
		
			
			| 
				
			 | 
			
				414
			 | 
			
			
				+        sel=$? 
			 | 
		
	
		
			
			| 
				
			 | 
			
				415
			 | 
			
			
				+        case $sel in 
			 | 
		
	
		
			
			| 
				
			 | 
			
				416
			 | 
			
			
				+            1) exit 1;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				417
			 | 
			
			
				+            255) exit 1;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				418
			 | 
			
			
				+        esac 
			 | 
		
	
		
			
			| 
				
			 | 
			
				419
			 | 
			
			
				+        case $(cat $data) in 
			 | 
		
	
		
			
			| 
				
			 | 
			
				420
			 | 
			
			
				+            1) add_to_mailing_list;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				421
			 | 
			
			
				+            2) email_rule;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				422
			 | 
			
			
				+            3) block_unblock_email;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				423
			 | 
			
			
				+            4) block_unblock_subject;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				424
			 | 
			
			
				+            5) break;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				425
			 | 
			
			
				+        esac 
			 | 
		
	
		
			
			| 
				
			 | 
			
				426
			 | 
			
			
				+    done 
			 | 
		
	
		
			
			| 
				
			 | 
			
				427
			 | 
			
			
				+} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				428
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				429
			 | 
			
			
				+function menu_users { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				430
			 | 
			
			
				+    while true 
			 | 
		
	
		
			
			| 
				
			 | 
			
				431
			 | 
			
			
				+    do 
			 | 
		
	
		
			
			| 
				
			 | 
			
				432
			 | 
			
			
				+        data=$(tempfile 2>/dev/null) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				433
			 | 
			
			
				+        trap "rm -f $data" 0 1 2 5 15 
			 | 
		
	
		
			
			| 
				
			 | 
			
				434
			 | 
			
			
				+        dialog --backtitle "Freedombone Control Panel" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				435
			 | 
			
			
				+               --title "Control Panel" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				436
			 | 
			
			
				+               --radiolist "Choose an operation:" 12 70 5 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				437
			 | 
			
			
				+               1 "Add a user" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				438
			 | 
			
			
				+               2 "Delete a user" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				439
			 | 
			
			
				+               3 "Change user password" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				440
			 | 
			
			
				+               4 "Change user ssh public key" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				441
			 | 
			
			
				+               5 "Back to main menu" on 2> $data 
			 | 
		
	
		
			
			| 
				
			 | 
			
				442
			 | 
			
			
				+        sel=$? 
			 | 
		
	
		
			
			| 
				
			 | 
			
				443
			 | 
			
			
				+        case $sel in 
			 | 
		
	
		
			
			| 
				
			 | 
			
				444
			 | 
			
			
				+            1) exit 1;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				445
			 | 
			
			
				+            255) exit 1;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				446
			 | 
			
			
				+        esac 
			 | 
		
	
		
			
			| 
				
			 | 
			
				447
			 | 
			
			
				+        case $(cat $data) in 
			 | 
		
	
		
			
			| 
				
			 | 
			
				448
			 | 
			
			
				+            1) add_user;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				449
			 | 
			
			
				+            2) delete_user;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				450
			 | 
			
			
				+            3) change_password;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				451
			 | 
			
			
				+            4) change_ssh_public_key;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				452
			 | 
			
			
				+            5) break;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				453
			 | 
			
			
				+        esac 
			 | 
		
	
		
			
			| 
				
			 | 
			
				454
			 | 
			
			
				+    done 
			 | 
		
	
		
			
			| 
				
			 | 
			
				455
			 | 
			
			
				+} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				456
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				457
			 | 
			
			
				+function menu_top_level { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				458
			 | 
			
			
				+    while true 
			 | 
		
	
		
			
			| 
				
			 | 
			
				459
			 | 
			
			
				+    do 
			 | 
		
	
		
			
			| 
				
			 | 
			
				460
			 | 
			
			
				+        data=$(tempfile 2>/dev/null) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				461
			 | 
			
			
				+        trap "rm -f $data" 0 1 2 5 15 
			 | 
		
	
		
			
			| 
				
			 | 
			
				462
			 | 
			
			
				+        dialog --backtitle "Freedombone Control Panel" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				463
			 | 
			
			
				+               --title "Control Panel" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				464
			 | 
			
			
				+               --radiolist "Choose an operation:" 13 70 6 \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				465
			 | 
			
			
				+               1 "Backup or Restore" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				466
			 | 
			
			
				+               2 "Turn logging on/off" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				467
			 | 
			
			
				+               3 "Manage users" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				468
			 | 
			
			
				+               4 "Email filtering rules" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				469
			 | 
			
			
				+               5 "Security settings" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				470
			 | 
			
			
				+               6 "Exit" on 2> $data 
			 | 
		
	
		
			
			| 
				
			 | 
			
				471
			 | 
			
			
				+        sel=$? 
			 | 
		
	
		
			
			| 
				
			 | 
			
				472
			 | 
			
			
				+        case $sel in 
			 | 
		
	
		
			
			| 
				
			 | 
			
				473
			 | 
			
			
				+            1) exit 1;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				474
			 | 
			
			
				+            255) exit 1;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				475
			 | 
			
			
				+        esac 
			 | 
		
	
		
			
			| 
				
			 | 
			
				476
			 | 
			
			
				+        case $(cat $data) in 
			 | 
		
	
		
			
			| 
				
			 | 
			
				477
			 | 
			
			
				+            1) menu_backup_restore;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				478
			 | 
			
			
				+            2) logging_on_off;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				479
			 | 
			
			
				+            3) menu_users;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				480
			 | 
			
			
				+            4) menu_email;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				481
			 | 
			
			
				+            5) freedombone-sec;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				482
			 | 
			
			
				+            6) break;; 
			 | 
		
	
		
			
			| 
				415
			 | 
			
				483
			 | 
			
			
				         esac 
			 | 
		
	
		
			
			| 
				416
			 | 
			
				484
			 | 
			
			
				     done 
			 | 
		
	
		
			
			| 
				417
			 | 
			
				485
			 | 
			
			
				 } 
			 |