Promise: add check if CODE is null

parent d82b7fc4
......@@ -11,6 +11,10 @@ fi
CODE=$(%(curl_path)s -k -sL $URL -w %%{http_code} -o /dev/null)
if [ ! $CODE ]; then
echo "$URL is not available (server not reachable)." >&2
exit 1
if [ $CODE -eq 000 ]; then
echo "$URL is not available (server not reachable)." >&2
exit 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment