From 05b7cf2fa22cdb9cd85a66987334b0eab7a47a33 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Sep 2014 22:07:35 +0100 Subject: [PATCH] If this is only a mailbox system then exit after email has installed --- install-freedombone.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/install-freedombone.sh b/install-freedombone.sh index 051c34eb..4ddef0e8 100755 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -62,6 +62,7 @@ DOMAIN_NAME=$1 MY_USERNAME=$2 FREEDNS_SUBDOMAIN_CODE=$3 +SYSTEM_TYPE=$4 SSH_PORT=2222 KERNEL_VERSION="v3.15.10-bone7" @@ -1214,6 +1215,18 @@ function import_email { fi fi echo 'import_email' >> $COMPLETION_FILE + if [[ $SYSTEM_TYPE == "email" || $SYSTEM_TYPE == "mailbox" ]]; then + # unmount any attached usb drive + echo '' + echo ' *** Freedombone email system installation is complete ***' + echo '' + if [ -d /media/usb ]; then + umount /media/usb + rm -rf /media/usb + echo ' You can now remove the USB drive' + fi + exit 0 + fi } function install_final { @@ -1267,3 +1280,4 @@ dynamic_dns_freedns import_email install_final echo 'Freedombone installation is complete' +exit 0