docker-entrypoint.sh 880 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env bash
  2. if [ ! -z "${APPNET}" ]; then
  3. echo "Initial nslookup ${HOSTNAME}.${APPNET}"
  4. nslookup ${HOSTNAME}.${APPNET}
  5. while [ $? -ne 0 ]; do
  6. echo "Waiting for ${HOSTNAME}.${APPNET} to become available"
  7. sleep 1
  8. nslookup ${HOSTNAME}.${APPNET}
  9. done
  10. echo "Initial nslookup ${ADMIN_HOST}.${APPNET}"
  11. nslookup ${ADMIN_HOST}.${APPNET}
  12. while [ $? -ne 0 ]; do
  13. echo "Waiting for ${ADMIN_HOST}.${APPNET} to become available"
  14. sleep 1
  15. nslookup ${ADMIN_HOST}.${APPNET}
  16. done
  17. fi
  18. # See Redmine 103910
  19. admin_ip=$(nslookup ${ADMIN_HOST}.${APPNET}|grep Address|tail -n +2|cut -d " " -f2)
  20. echo ${admin_ip} > /tmp/admin_ip
  21. echo "#Dummy" >> /etc/rc.d/init.d/functions
  22. source /etc/init.d/web-registry-portal status
  23. if [ ! -z "$*" ]
  24. then
  25. exec "$@"
  26. else
  27. exec ${WEB_REGISTRY_BIN} ${WEB_REGISTRY_CUSTOM_OPTS} ${WEB_REGISTRY_OPTS}
  28. fi