Browse Source

Split gpg key if social key management is enabled

Bob Mottram 9 years ago
parent
commit
f7dc604b23
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      src/freedombone

+ 13
- 0
src/freedombone View File

6602
   echo 'create_private_mailing_list' >> $COMPLETION_FILE
6602
   echo 'create_private_mailing_list' >> $COMPLETION_FILE
6603
 }
6603
 }
6604
 
6604
 
6605
+function split_gpg_key_into_fragments {
6606
+  # split the gpg key into fragments if social key management is enabled
6607
+  if [[ $ENABLE_SOCIAL_KEY_MANAGEMENT == "yes" ]]; then
6608
+      echo 'Splitting GPG key. You may need to enter your passphrase.'
6609
+      freedombone-splitkey -u $MY_USERNAME -e $MY_EMAIL_ADDRESS
6610
+  fi
6611
+}
6612
+
6605
 function import_email {
6613
 function import_email {
6606
   if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
6614
   if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
6607
       return
6615
       return
6613
           create_restore_script
6621
           create_restore_script
6614
           backup_to_friends_servers
6622
           backup_to_friends_servers
6615
           intrusion_detection
6623
           intrusion_detection
6624
+          split_gpg_key_into_fragments
6616
           echo ''
6625
           echo ''
6617
           echo "$EMAIL_COMPLETE_MSG"
6626
           echo "$EMAIL_COMPLETE_MSG"
6618
           if [ -d $USB_MOUNT ]; then
6627
           if [ -d $USB_MOUNT ]; then
6640
       create_restore_script
6649
       create_restore_script
6641
       backup_to_friends_servers
6650
       backup_to_friends_servers
6642
       intrusion_detection
6651
       intrusion_detection
6652
+      split_gpg_key_into_fragments
6643
       # unmount any attached usb drive
6653
       # unmount any attached usb drive
6644
       echo ''
6654
       echo ''
6645
       echo "$EMAIL_COMPLETE_MSG"
6655
       echo "$EMAIL_COMPLETE_MSG"
7000
           create_restore_script
7010
           create_restore_script
7001
           backup_to_friends_servers
7011
           backup_to_friends_servers
7002
           intrusion_detection
7012
           intrusion_detection
7013
+          split_gpg_key_into_fragments
7003
           # unmount any attached usb drive
7014
           # unmount any attached usb drive
7004
           if [ -d $USB_MOUNT ]; then
7015
           if [ -d $USB_MOUNT ]; then
7005
               umount $USB_MOUNT
7016
               umount $USB_MOUNT
7225
       create_restore_script
7236
       create_restore_script
7226
       backup_to_friends_servers
7237
       backup_to_friends_servers
7227
       intrusion_detection
7238
       intrusion_detection
7239
+      split_gpg_key_into_fragments
7228
       # unmount any attached usb drive
7240
       # unmount any attached usb drive
7229
       if [ -d $USB_MOUNT ]; then
7241
       if [ -d $USB_MOUNT ]; then
7230
           umount $USB_MOUNT
7242
           umount $USB_MOUNT
9382
       umount $USB_MOUNT
9394
       umount $USB_MOUNT
9383
       rm -rf $USB_MOUNT
9395
       rm -rf $USB_MOUNT
9384
   fi
9396
   fi
9397
+  split_gpg_key_into_fragments
9385
   echo 'install_final' >> $COMPLETION_FILE
9398
   echo 'install_final' >> $COMPLETION_FILE
9386
   echo ''
9399
   echo ''
9387
   echo '  *** Freedombone installation is complete. Rebooting... ***'
9400
   echo '  *** Freedombone installation is complete. Rebooting... ***'