diff options
Diffstat (limited to 'bootstrap/create-hostsfile.sh')
-rwxr-xr-x | bootstrap/create-hostsfile.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bootstrap/create-hostsfile.sh b/bootstrap/create-hostsfile.sh new file mode 100755 index 0000000..2aaf9cb --- /dev/null +++ b/bootstrap/create-hostsfile.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +source include/tgmanage.cfg.sh +if [ -z ${PRIMARY} ] +then + echo "Not configured!"; + exit 1; +fi; + +echo >> /etc/hosts +echo "# Bootstrap hosts entries for ${TGNAME} ">> /etc/hosts +echo "${PRI_V6} ${PRIMARY}" >> /etc/hosts +echo "${PRI_V4} ${PRIMARY}" >> /etc/hosts +echo "${SEC_V6} ${SECONDARY}" >> /etc/hosts +echo "${SEC_V4} ${SECONDARY}" >> /etc/hosts |