File tree Expand file tree Collapse file tree 1 file changed +24
-14
lines changed
Expand file tree Collapse file tree 1 file changed +24
-14
lines changed Original file line number Diff line number Diff line change 158158 esac
159159fi
160160
161-
162-
163-
164161if [[ -z " ${OPEN_FIREWALL} " ]] && [[ " ${CONFIRM_INSTALL} " == " n" ]]
165162then
166163 OPEN_FIREWALL=" n"
@@ -190,17 +187,31 @@ esac
190187[[ -n " ${NODERED_HOME} " ]] || export NODERED_HOME=" /home/${NODERED_USER} "
191188
192189
193- # check internet, if failure exit
194- if curl -f https://www.npmjs.com/package/node-red > /dev/null 2>&1
195- then
196- echo " "
190+ # # check internet, if failure exit
191+ # if curl -f https://www.npmjs.com/package/node-red >/dev/null 2>&1
192+ # then
193+ # echo " "
194+ # else
195+ # echo " "
196+ # echo "Sorry - cannot connect to internet - not going to touch anything."
197+ # echo "https://www.npmjs.com/package/node-red is not reachable."
198+ # echo "Please ensure you have a working internet connection."
199+ # echo " "
200+ # exit 1
201+ # fi
202+
203+ output=$( npm ping 2>&1 )
204+ exit_code=$?
205+
206+ if [ $exit_code -eq 0 ]; then
207+ echo " "
197208else
198- echo " "
199- echo " Sorry - cannot connect to internet - not going to touch anything."
200- echo " https://www.npmjs.com/package/node-red is not reachable."
201- echo " Please ensure you have a working internet connection."
202- echo " "
203- exit 1
209+ echo " "
210+ echo " Sorry - cannot connect to internet - not going to touch anything."
211+ echo " https://www.npmjs.com/package/node-red is not reachable."
212+ echo " Please ensure you have a working internet connection."
213+ echo " "
214+ return 1
204215fi
205216
206217# final install details
415426 exit 1
416427 ;;
417428esac
418-
You can’t perform that action at this time.
0 commit comments