catch errors and exit with proper exit code

This commit is contained in:
Jason Ertel
2023-03-21 10:44:21 -04:00
parent 2e6fa1eff0
commit efd5f7b8a2

View File

@@ -31,8 +31,11 @@ if [ "$ELASTICSEARCH_CONNECTED" == "no" ]; then
echo
echo -e "Connection attempt timed out. Unable to connect to ElasticSearch. \nPlease try: \n -checking log(s) in /var/log/elasticsearch/\n -running 'sudo docker ps' \n -running 'sudo so-elastic-restart'"
echo
exit 1
fi
set -e
cd ${ELASTICSEARCH_TEMPLATES}/component/ecs
echo "Loading ECS component templates..."