Added email_dashboard function to dashboard.sh
This commit is contained in:
parent
986d5e7398
commit
933c0974a2
@ -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 <<EOF
|
||||
<html>
|
||||
<img src="https://www.federated.computer/wp-content/uploads/2023/11/logo.png" alt="" /><br>
|
||||
<p>
|
||||
<h4>Dashboard is now installed on $DOMAIN</h4>
|
||||
<p>
|
||||
Dear Customer,<br>
|
||||
<br>
|
||||
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 <a href="https://dashboard.$DOMAIN">https://dashboard.$DOMAIN</a>
|
||||
<br>
|
||||
<br>
|
||||
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!
|
||||
<br>
|
||||
<br>
|
||||
Best,
|
||||
<br>
|
||||
Federated Computer
|
||||
<p>
|
||||
</html>
|
||||
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"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user