From f2e0f501a0881fa8c33ca45b0255f624a6070ea9 Mon Sep 17 00:00:00 2001 From: ThellraAK <github.com@absurdlybored.com> Date: Wed, 21 Dec 2022 23:22:12 -0900 Subject: [PATCH] Update to allow continue despite network issues Change to allow install to continue like it does for Postgres --- setup/paperless-ngx-install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup/paperless-ngx-install.sh b/setup/paperless-ngx-install.sh index 41e72f36..14fa3d1b 100644 --- a/setup/paperless-ngx-install.sh +++ b/setup/paperless-ngx-install.sh @@ -61,8 +61,14 @@ msg_ok "Network Connected: ${BL}$(hostname -I)" set +e alias die='' if nc -zw1 8.8.8.8 443; then msg_ok "Internet Connected"; else - msg_error "Internet NOT Connected" - exit 1 + msg_error "Internet NOT Connected" + read -r -p "Would you like to continue anyway? <y/N> " prompt + if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then + echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}" + else + echo -e " 🖧 Check Network Settings" + exit 1 + fi fi RESOLVEDIP=$(nslookup "github.com" | awk -F':' '/^Address: / { matched = 1 } matched { print $2}' | xargs) if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi