aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/create-hostsfile.sh
blob: 2aaf9cb23ec4e01ac3a9d465299c071364067174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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