remove unnecessary check for setup process

autoheal was copied from kenya-emr and was still checking for a setup.pid file
and process. This won't do any harm but also does not add value.
This commit is contained in:
2024-04-03 16:28:04 -07:00
parent 9cbefc841f
commit cb4c6b4c1a
@@ -18,10 +18,6 @@ trap exit INT
# run at fixed interval, checking for and restarting any service marked as 'unhealthy' # run at fixed interval, checking for and restarting any service marked as 'unhealthy'
pushd $LOCATION > /dev/null pushd $LOCATION > /dev/null
while [ 1 ]; do while [ 1 ]; do
# if setup is not running, make sure containers are active and running
if ! kill -0 $(cat ${LOCATION}/setup.pid 2> /dev/null) 2> /dev/null; then
# get current state (running or not) and status (healthy, unhealthy, etc) # get current state (running or not) and status (healthy, unhealthy, etc)
app_state=$(docker compose ps --format '{{.State}}' streamline-emr) app_state=$(docker compose ps --format '{{.State}}' streamline-emr)
app_status=$(docker compose ps --format '{{.Status}}' streamline-emr) app_status=$(docker compose ps --format '{{.Status}}' streamline-emr)
@@ -37,7 +33,6 @@ pushd $LOCATION > /dev/null
echo "Container not running. Starting 'streamline-emr'" echo "Container not running. Starting 'streamline-emr'"
docker compose up -d streamline-emr docker compose up -d streamline-emr
fi fi
fi
# wait a little while before checking again # wait a little while before checking again
sleep $INTERVAL sleep $INTERVAL