mirror of
https://github.com/Dannecron/netology-devops-gitlab.git
synced 2025-12-25 15:22:35 +03:00
12 lines
220 B
Bash
Executable File
12 lines
220 B
Bash
Executable File
#!/bin/sh
|
|
|
|
statusCode=$(curl -s -o /dev/null -w "%{http_code}" http://$PYTHON_API_HOSTNAME:5290/get_info)
|
|
|
|
if [ $statusCode == "200" ]; then
|
|
echo "service available"
|
|
exit 0
|
|
else
|
|
echo "service unavailable"
|
|
exit 1
|
|
fi
|