Skip to content

Commit

Permalink
Added check to startup script for systemd to detect exits on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
IBims1NicerTobi authored Aug 20, 2023
1 parent 75a8bcf commit e764e1a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ url="$PROTOCOL://$HOST:$PORT/ready"
result=$(curl -k -s -o /dev/null $url -w %{http_code})
while [ "${result:0:2}" != "20" ] && [ "${result:0:2}" != "40" ]; do
attempts=$(($attempts+1))
if [ ! -f /proc/$PID ]; then
echo "InfluxDB exited during startup"
exit 1
fi
echo "InfluxDB API at $url unavailable after $attempts attempts..."
sleep 1
result=$(curl -k -s -o /dev/null $url -w %{http_code})
Expand Down

0 comments on commit e764e1a

Please sign in to comment.