#!/bin/sh -e

# Print the administration URL in the MOTD
# Use an ip address URL for now; this could get prettier in the future,
# perhaps using the hostname.

printf "\nWelcome to the Ubuntu Enterprise Cloud!\n"
printf " * Documentation:  https://help.ubuntu.com/community/UEC\n"
printf " * Support:        http://www.ubuntu.com/cloud\n"

# If we could get eucalyptus-ipaddr.conf working correctly, we
# could print the CLC's ip addr from any machine.
if [ -r "/usr/share/doc/eucalyptus-cloud/copyright" ]; then
	. /etc/eucalyptus/eucalyptus-ipaddr.conf
	printf " * Administration: https://%s:8443/\n" "$CLOUD_IP_ADDR"
fi
