Change to keep the Docker container running

This commit is contained in:
Vivek Teega 2021-05-10 16:26:52 +05:30
parent 4e676e97c5
commit 3581264adb

View File

@ -76,7 +76,7 @@ curl --silent http://localhost:3001/api/status?q=getBestBlockHash > currentHealt
echo 'different' > previousHealthCheck.log echo 'different' > previousHealthCheck.log
# Every 5 minutes # Every 5 minutes
#while true; do while true; do
# # Check to see if the most recent block hash is the same as the last time we checked. # # Check to see if the most recent block hash is the same as the last time we checked.
# if [ "$(cat previousHealthCheck.log)" == "$(cat currentHealthCheck.log)" ] # if [ "$(cat previousHealthCheck.log)" == "$(cat currentHealthCheck.log)" ]
# then # then
@ -87,10 +87,10 @@ echo 'different' > previousHealthCheck.log
# ./node_modules/flocore-node/bin/flocore-node start >> /data/latest.log & # ./node_modules/flocore-node/bin/flocore-node start >> /data/latest.log &
# # Store PID for later # # Store PID for later
# echo $! > /data/flosight.pid # echo $! > /data/flosight.pid
# fi fi
# # Wait 5 minutes before checking again # # Wait 5 minutes before checking again
# timeout 5m tail -f /data/latest.log timeout 5m tail -f /data/latest.log
# #
# mv currentHealthCheck.log previousHealthCheck.log # mv currentHealthCheck.log previousHealthCheck.log
# curl --silent http://localhost:3001/api/status?q=getBestBlockHash > currentHealthCheck.log # curl --silent http://localhost:3001/api/status?q=getBestBlockHash > currentHealthCheck.log
#done; done;