Files
cloudron-box/setup/start/cloudron-motd

41 lines
1.7 KiB
Plaintext
Raw Normal View History

2019-02-05 09:52:15 -08:00
#!/bin/bash
2019-02-05 14:58:44 -08:00
[[ -f /etc/update-motd.d/91-cloudron-install-in-progress ]] && exit
2019-02-07 14:07:30 -08:00
printf "**********************************************************************\n\n"
2019-02-05 09:52:15 -08:00
if [[ -z "$(ls -A /home/yellowtent/boxdata/mail/dkim)" ]]; then
2020-03-09 14:33:48 -07:00
if [[ -f /tmp/.cloudron-motd-cache ]]; then
ip=$(cat /tmp/.cloudron-motd-cache)
elif ! ip=$(curl --fail --connect-timeout 2 --max-time 2 -q https://api.cloudron.io/api/v1/helper/public_ip | sed -n -e 's/.*"ip": "\(.*\)"/\1/p'); then
ip='<IP>'
fi
echo "${ip}" > /tmp/.cloudron-motd-cache
if [[ ! -f /etc/cloudron/SETUP_TOKEN ]]; then
url="https://${ip}"
else
setupToken="$(cat /etc/cloudron/SETUP_TOKEN)"
url="https://${ip}/?setupToken=${setupToken}"
fi
2019-02-05 16:51:27 -08:00
printf "\t\t\tWELCOME TO CLOUDRON\n"
printf "\t\t\t-------------------\n"
2019-02-05 09:52:15 -08:00
printf '\n\e[1;32m%-6s\e[m\n\n' "Visit ${url} on your browser and accept the self-signed certificate to finish setup."
2020-09-15 14:46:22 -07:00
printf "Cloudron overview - https://docs.cloudron.io/ \n"
printf "Cloudron setup - https://docs.cloudron.io/installation/#setup \n"
2019-02-05 16:51:27 -08:00
else
printf "\t\t\tNOTE TO CLOUDRON ADMINS\n"
printf "\t\t\t-----------------------\n"
printf "Please do not run apt upgrade manually as it will update packages that\n"
printf "Cloudron relies on and may break your installation. Ubuntu security updates\n"
printf "are automatically installed on this server every night.\n"
printf "\n"
2020-09-15 14:46:22 -07:00
printf "Read more at https://docs.cloudron.io/security/#os-updates\n"
fi
2019-02-05 16:51:27 -08:00
printf "\nFor help and more information, visit https://forum.cloudron.io\n\n"
2019-02-07 14:07:30 -08:00
printf "**********************************************************************\n"