From f7dc604b23f12966096f023c12c9b9139acacbef Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 5 Jul 2015 22:10:12 +0100 Subject: [PATCH] Split gpg key if social key management is enabled --- src/freedombone | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/freedombone b/src/freedombone index f7c1fda1..585b1ab0 100755 --- a/src/freedombone +++ b/src/freedombone @@ -6602,6 +6602,14 @@ function create_private_mailing_list { echo 'create_private_mailing_list' >> $COMPLETION_FILE } +function split_gpg_key_into_fragments { + # split the gpg key into fragments if social key management is enabled + if [[ $ENABLE_SOCIAL_KEY_MANAGEMENT == "yes" ]]; then + echo 'Splitting GPG key. You may need to enter your passphrase.' + freedombone-splitkey -u $MY_USERNAME -e $MY_EMAIL_ADDRESS + fi +} + function import_email { if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then return @@ -6613,6 +6621,7 @@ function import_email { create_restore_script backup_to_friends_servers intrusion_detection + split_gpg_key_into_fragments echo '' echo "$EMAIL_COMPLETE_MSG" if [ -d $USB_MOUNT ]; then @@ -6640,6 +6649,7 @@ function import_email { create_restore_script backup_to_friends_servers intrusion_detection + split_gpg_key_into_fragments # unmount any attached usb drive echo '' echo "$EMAIL_COMPLETE_MSG" @@ -7000,6 +7010,7 @@ function install_owncloud { create_restore_script backup_to_friends_servers intrusion_detection + split_gpg_key_into_fragments # unmount any attached usb drive if [ -d $USB_MOUNT ]; then umount $USB_MOUNT @@ -7225,6 +7236,7 @@ quit" > $INSTALL_DIR/batch.sql create_restore_script backup_to_friends_servers intrusion_detection + split_gpg_key_into_fragments # unmount any attached usb drive if [ -d $USB_MOUNT ]; then umount $USB_MOUNT @@ -9382,6 +9394,7 @@ function install_final { umount $USB_MOUNT rm -rf $USB_MOUNT fi + split_gpg_key_into_fragments echo 'install_final' >> $COMPLETION_FILE echo '' echo ' *** Freedombone installation is complete. Rebooting... ***'