- #!/usr/bin/env bash
- echo "Initial nslookup ${HOSTNAME}.${APPNET}"
- nslookup ${HOSTNAME}.${APPNET}
- while [ $? -ne 0 ]; do
- echo "Waiting for ${HOSTNAME}.${APPNET} to become available"
- sleep 1
- nslookup ${HOSTNAME}.${APPNET}
- done
- sed -i "s/\${DB_CLUSTER}/\"${DB_CLUSTER}\"/" /etc/web-laboratory-admin/application.conf
- sed -i "s/ADMINHOST/$(dig ${HOSTNAME}.${APPNET} +short)/" /etc/web-laboratory-admin/application.conf
- exec "$@"
|