Add timeout to curl that is not otherwise killed by slapos promise subsystem.

parent 248e6a26
......@@ -10,7 +10,7 @@ if [ -z $URL ]; then
exit 3
fi
%(curl_path)s -k -sL $URL | grep "$MATCH" > /dev/null
%(curl_path)s -k -sL $URL --max-time 10 | grep "$MATCH" > /dev/null
if [ $? != 0 ]; then
echo "Content at $URL seems to be corrupted" >&2
......
......@@ -9,7 +9,7 @@ if [ -z $URL ]; then
exit 3
fi
CODE=$(%(curl_path)s -g -k -sL $URL -w %%{http_code} -o /dev/null)
CODE=$(%(curl_path)s -g -k -sL $URL -w %%{http_code} --max-time 10 -o /dev/null)
if [ $? -eq 3 ]; then
echo "URL malformed: $URL." >&2
......
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