Fix certbot-auto

This commit is contained in:
Adrien Ferrand 2019-11-06 22:28:42 +01:00
parent c7b9288249
commit a775ce3ac1
2 changed files with 12 additions and 0 deletions

View file

@ -1888,6 +1888,12 @@ UNLIKELY_EOF
error "WARNING: unable to check for updates."
fi
# If for any reason REMOTE_VERSION is not set, let's assume certbot-auto is up-to-date,
# in order to avoid potential failures because of an unset REMOTE_VERSION variable.
if [ -z "$REMOTE_VERSION" ]; then
REMOTE_VERSION="$LE_AUTO_VERSION"
fi
LE_VERSION_STATE=`CompareVersions "$LE_PYTHON" "$LE_AUTO_VERSION" "$REMOTE_VERSION"`
if [ "$LE_VERSION_STATE" = "UNOFFICIAL" ]; then
say "Unofficial certbot-auto version detected, self-upgrade is disabled: $LE_AUTO_VERSION"

View file

@ -764,6 +764,12 @@ UNLIKELY_EOF
error "WARNING: unable to check for updates."
fi
# If for any reason REMOTE_VERSION is not set, let's assume certbot-auto is up-to-date,
# in order to avoid potential failures because of an unset REMOTE_VERSION variable.
if [ -z "$REMOTE_VERSION" ]; then
REMOTE_VERSION="$LE_AUTO_VERSION"
fi
LE_VERSION_STATE=`CompareVersions "$LE_PYTHON" "$LE_AUTO_VERSION" "$REMOTE_VERSION"`
if [ "$LE_VERSION_STATE" = "UNOFFICIAL" ]; then
say "Unofficial certbot-auto version detected, self-upgrade is disabled: $LE_AUTO_VERSION"