Commit 679bfc8c authored by Howard Hicks's avatar Howard Hicks Committed by David Runge
Browse files

Fixes failure to retry script download. Tested and verified the issue is resolved.

The curl --retry-connrefused option is used with not instead of the --retry <num> option to add an extra type of failure to retry on, without --retry <num> it does not retry at all even on a connection refused. 

https://man.archlinux.org/man/curl.1.en
parent 2cbf5abe
...@@ -16,7 +16,7 @@ automated_script () ...@@ -16,7 +16,7 @@ automated_script ()
script="$(script_cmdline)" script="$(script_cmdline)"
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
if [[ "${script}" =~ ^((http|https|ftp)://) ]]; then if [[ "${script}" =~ ^((http|https|ftp)://) ]]; then
curl "${script}" --location --retry-connrefused -s -o /tmp/startup_script >/dev/null curl "${script}" --location --retry-connrefused --retry 10 -s -o /tmp/startup_script >/dev/null
rt=$? rt=$?
else else
cp "${script}" /tmp/startup_script cp "${script}" /tmp/startup_script
......
Supports Markdown
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