From 1d85ddb38f8ae18fd379a4ddca243b92b6974579 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Thu, 5 Jul 2018 12:31:03 +0100
Subject: [PATCH] Optional admin email address

---
 src/freedombone-notification | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/freedombone-notification b/src/freedombone-notification
index e30b27948..78de5aa78 100755
--- a/src/freedombone-notification
+++ b/src/freedombone-notification
@@ -71,7 +71,10 @@ fi
 if [ ! "$ADMIN_USERNAME" ]; then
     ADMIN_USERNAME=$(grep "Admin user" "$COMPLETION_FILE" | awk -F ':' '{print $2}')
 fi
-ADMIN_EMAIL_ADDRESS=${ADMIN_USERNAME}@${HOSTNAME}
+
+if [ ! "$ADMIN_EMAIL_ADDRESS" ]; then
+    ADMIN_EMAIL_ADDRESS=${ADMIN_USERNAME}@${HOSTNAME}
+fi
 
 # send email to administrator
 if [ "$SUBJECT" ]; then
-- 
GitLab