Skip to content

Commit b5696dc

Browse files
authored
Update run
1 parent 2056f9a commit b5696dc

File tree

1 file changed

+3
-0
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-unifi-network-application-config

1 file changed

+3
-0
lines changed

root/etc/s6-overlay/s6-rc.d/init-unifi-network-application-config/run

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ if [[ ! -e /config/data/system.properties ]]; then
2323
if [[ -z "${MONGO_HOST}" ]]; then
2424
echo "*** No MONGO_HOST set, cannot configure database settings. ***"
2525
exit 1
26+
elif ! nc -w1 "${MONGO_HOST}" ${MONGO_PORT}; then
27+
echo "*** Defined MONGO_HOST is not reachable, cannot proceed. ***"
28+
exit 1
2629
else
2730
sed -i "s/~MONGO_USER~/${MONGO_USER}/" /defaults/system.properties
2831
sed -i "s/~MONGO_HOST~/${MONGO_HOST}/" /defaults/system.properties

0 commit comments

Comments
 (0)