diff --git a/lib/dashboard.sh b/lib/dashboard.sh index 6b17930..a916b71 100644 --- a/lib/dashboard.sh +++ b/lib/dashboard.sh @@ -3,6 +3,7 @@ # Dashboard Service PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +get_appvars config_dashboard() { echo -ne "\n* Configuring /federated/apps/dashboard container.." @@ -89,3 +90,36 @@ uninstall_dashboard() { kill -9 $SPINPID &> /dev/null echo -ne "done.\n" } +email_dashboard() { + echo -ne "* Sending email to customer.." + spin & + SPINPID=$! + +cat > /federated/apps/mail/data/root/certs/mailfile < +
+

+

Dashboard is now installed on $DOMAIN

+

+Dear Customer,
+
+We'd like to introduce you to "Dashboard", a simple application listing all the applications installed on your Federated Core. You can find "Dashboard" at https://dashboard.$DOMAIN +
+
+This is the first step in a number of big changes you'll be seeing from Federated Computer in the coming months to improve and enhance your Federated Core. Thank you for being a customer! +
+
+Best, +
+Federated Computer +

+ +EOF + + # Send out e-mail from mail container with details + docker exec mail bash -c "mail -r admin@$DOMAIN -a \"Content-type: text/html\" -s \"Application installed on $DOMAIN\" $EMAIL < /root/certs/mailfile" + rm /federated/apps/mail/data/root/certs/mailfile + + kill -9 $SPINPID &> /dev/null + echo -ne "done.\n" +}