diff --git a/README.md b/README.md index 5cadeec..3168e89 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,9 @@ USER_AGENT="--user-agent='anvil-cert-puller'" FETCH="/usr/bin/fetch --mirror --quiet --user-agent=${USER_AGENT}'" CURL="/usr/local/bin/curl --silent --user-agent '${USER_AGENT}' --remote-time" WGET="/usr/local/bin/wget --quiet --user-agent='${USER_AGENT}'" - +FETCH_OPTIONS="-4" +CURL_OPTIONS="-4" +WGET_OPTIONS="-4" ``` After getting new certs, services need to be restarted/reloaded. diff --git a/cert-puller b/cert-puller index 8fc99e4..96329a4 100755 --- a/cert-puller +++ b/cert-puller @@ -125,15 +125,15 @@ fetch_new_certs(){ case ${FETCH_TOOL} in "wget") ${LOGGER} running: ${WGET} --output-document=${DOWNLOAD_DIR}/${file} ${CERT_SERVER}/${cert}/${file} - ${WGET} --output-document=${DOWNLOAD_DIR}/${file} ${CERT_SERVER}/${cert}/${file} + ${WGET} ${WGET_OPTIONS} --output-document=${DOWNLOAD_DIR}/${file} ${CERT_SERVER}/${cert}/${file} ;; "curl") ${LOGGER} running: ${CURL} -o ${DOWNLOAD_DIR}/${file} ${CERT_SERVER}/${cert}/${file} - ${CURL} -o ${DOWNLOAD_DIR}/${file} ${CERT_SERVER}/${cert}/${file} + ${CURL} ${CURL_OPTIONS} -o ${DOWNLOAD_DIR}/${file} ${CERT_SERVER}/${cert}/${file} ;; *) ${LOGGER} running: ${FETCH} -o ${DOWNLOAD_DIR} ${CERT_SERVER}/${cert}/${file} - ${FETCH} -o ${DOWNLOAD_DIR} ${CERT_SERVER}/${cert}/${file} + ${FETCH} ${FETCH_OPTIONS} -o ${DOWNLOAD_DIR} ${CERT_SERVER}/${cert}/${file} ;; esac RESULT=$?