From a73eb2d41e3a1b00f2003f88858379b51510d284 Mon Sep 17 00:00:00 2001 From: Weilbyte Date: Fri, 25 Mar 2022 13:10:33 +0100 Subject: [PATCH] Fix curl check when offline --- PVEDiscordDark.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PVEDiscordDark.sh b/PVEDiscordDark.sh index 01ac000..70ea180 100644 --- a/PVEDiscordDark.sh +++ b/PVEDiscordDark.sh @@ -37,11 +37,6 @@ hash sed 2>/dev/null || { exit 1; } -hash curl 2>/dev/null || { - echo -e >&2 "${BRED}cURL is required but missing from your system${REG}"; - exit 1; -} - hash pveversion 2>/dev/null || { echo -e >&2 "${BRED}PVE installation required but missing from your system${REG}"; exit 1; @@ -50,6 +45,11 @@ hash pveversion 2>/dev/null || { if test -d "$OFFLINEDIR"; then echo "Offline directory detected, entering offline mode." OFFLINE=true +else + hash curl 2>/dev/null || { + echo -e >&2 "${BRED}cURL is required but missing from your system${REG}"; + exit 1; + } fi if [ "$OFFLINE" = false ]; then