Update paperless-ngx-v5-install.sh

correct missing network retries
pull/1045/head
tteckster 2023-02-08 03:59:42 -05:00 committed by GitHub
parent 4d8285a484
commit 15c6c046ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 8 deletions

View File

@ -47,15 +47,18 @@ function msg_error() {
msg_info "Setting up Container OS " msg_info "Setting up Container OS "
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
locale-gen >/dev/null locale-gen >/dev/null
while [ "$(hostname -I)" = "" ]; do for ((i=RETRY_NUM; i>0; i--)); do
echo 1>&2 -en "${CROSS}${RD} No Network! " if [ "$(hostname -I)" != "" ]; then
sleep $RETRY_EVERY break
((NUM--)) fi
if [ $NUM -eq 0 ]; then echo 1>&2 -en "${CROSS}${RD} No Network! "
echo 1>&2 -e "${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}" sleep $RETRY_EVERY
exit 1
fi
done done
if [ "$(hostname -I)" = "" ]; then
echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
echo -e " 🖧 Check Network Settings"
exit 1
fi
msg_ok "Set up Container OS" msg_ok "Set up Container OS"
msg_ok "Network Connected: ${BL}$(hostname -I)" msg_ok "Network Connected: ${BL}$(hostname -I)"