summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-05-23 12:27:38 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-05-29 11:16:35 +0000
commit7336268759f8d210d2270d0182bceda2c81766be (patch)
tree78f353cada0d2dde28fa31152bcb0e9ccd38954a
parentb439ea061edc7bc15a4c0aa4d90e511dadf2d75c (diff)
downloaddefinitions-7336268759f8d210d2270d0182bceda2c81766be.tar.gz
Allow TROVE_HOSTNAME to be set separately from TROVE_ID
-rwxr-xr-xtrove.configure8
1 files changed, 7 insertions, 1 deletions
diff --git a/trove.configure b/trove.configure
index 4bbe50d5..a4000e42 100755
--- a/trove.configure
+++ b/trove.configure
@@ -20,6 +20,7 @@
# from the environment (see MUSTARD for a description of them):
#
# * TROVE_ID
+# * TROVE_HOSTNAME (optional, defaults to TROVE_ID)
# * TROVE_COMPANY
# * LORRY_SSH_KEY
# * UPSTREAM_TROVE
@@ -42,6 +43,11 @@ set -e
ROOT="$1"
+if [ -z "$TROVE_HOSTNAME" ]
+then
+ export TROVE_HOSTNAME="$TROVE_ID"
+fi
+
##########################################################################
# Configuration in /etc, which we need to do on all deployments.
##########################################################################
@@ -56,7 +62,7 @@ lua_escape()
echo "Creating /etc/trove-setup.sed"
cat <<EOF > "$ROOT"/etc/trove-setup.sed
-s/##TROVE_HOSTNAME##/$TROVE_ID/g
+s/##TROVE_HOSTNAME##/$TROVE_HOSTNAME/g
s/##MASON_HOST##/$MASON_ID/g
s/##MASON_PORT##/18755/g
s/##TROVE_TITLE##/$TROVE_ID/g