improved documentation of retry mode which wasn't clear, while trying to work out if croconaus is supposed to restart maco automatically or not (well it is)
This commit is contained in:
parent
3f371e27c1
commit
a6b4ccd81d
|
@ -66,7 +66,7 @@ OPTIONS :
|
||||||
Enable debug messages.
|
Enable debug messages.
|
||||||
|
|
||||||
-f,--fail
|
-f,--fail
|
||||||
Check update only if the last Maco update failed.
|
enables retry mode: enable this mode to trigger a maco update only if the last Maco update has failed (in this mode a new maco version is not checked).
|
||||||
|
|
||||||
-h,--help
|
-h,--help
|
||||||
Print this help message.
|
Print this help message.
|
||||||
|
@ -346,10 +346,10 @@ main() { # {{{
|
||||||
|| exit 0
|
|| exit 0
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
## If MACO_FAILED_MODE wasn't defined (argument, environment variable,…) {{{
|
## If MACO_RETRY_MODE wasn't defined (argument, environment variable,…) {{{
|
||||||
if [ -z "${MACO_FAILED_MODE}" ]; then
|
if [ -z "${MACO_RETRY_MODE}" ]; then
|
||||||
### Set False by default
|
### Set False by default
|
||||||
MACO_FAILED_MODE="1"
|
MACO_RETRY_MODE="1"
|
||||||
fi
|
fi
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
|
@ -384,9 +384,9 @@ Get Maco's versions from webserver."
|
||||||
is_var_empty "${CURRENT_MACO_VERSION}" "${LATEST_MACO_VERSION}" "${URGENT_MACO_VERSION}" "${CURRENT_TIMESTAMP}" "${LATEST_TIMESTAMP}" "${URGENT_TIMESTAMP}" \
|
is_var_empty "${CURRENT_MACO_VERSION}" "${LATEST_MACO_VERSION}" "${URGENT_MACO_VERSION}" "${CURRENT_TIMESTAMP}" "${LATEST_TIMESTAMP}" "${URGENT_TIMESTAMP}" \
|
||||||
&& exit 1
|
&& exit 1
|
||||||
|
|
||||||
## If MACO_FAILED_MODE is set {{{
|
## If MACO_RETRY_MODE is set {{{
|
||||||
### Exit if Maco last-update-succeeded
|
### Exit if Maco last-update-succeeded
|
||||||
if [ "${MACO_FAILED_MODE}" -eq "0" ]; then
|
if [ "${MACO_RETRY_MODE}" -eq "0" ]; then
|
||||||
### If Macostatus=last-update-succeeded
|
### If Macostatus=last-update-succeeded
|
||||||
### Exit
|
### Exit
|
||||||
is_maco_status_ok \
|
is_maco_status_ok \
|
||||||
|
@ -432,8 +432,8 @@ if [ ! "${NBARGS}" -eq "0" ]; then
|
||||||
while printf -- '%s' "${1}" | grep -q -E -- "^-+"; do
|
while printf -- '%s' "${1}" | grep -q -E -- "^-+"; do
|
||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
-f|--fail ) ## Failed mode
|
-f|--fail ) ## retry mode
|
||||||
MACO_FAILED_MODE="0"
|
MACO_RETRY_MODE="0"
|
||||||
;;
|
;;
|
||||||
-h|--help ) ## help
|
-h|--help ) ## help
|
||||||
usage
|
usage
|
||||||
|
|
Loading…
Reference in New Issue