Update pihole-install.sh

This commit is contained in:
tteckster 2022-04-25 14:07:12 -04:00 committed by GitHub
parent 4129a4bbfe
commit c13119da7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,6 +11,22 @@ CM="${GN}✓${CL}"
CROSS="${RD}${CL}"
BFR="\\r\\033[K"
HOLD="-"
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
shopt -s expand_aliases
alias die='EXIT=$? LINE=$LINENO error_exit'
trap die ERR
function error_exit() {
trap - ERR
local reason="Unknown failure occured."
local msg="${1:-$reason}"
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
echo -e "$flag $msg" 1>&2
exit $EXIT
}
function msg_info() {
local msg="$1"
@ -38,7 +54,7 @@ done
msg_ok "Set up Container OS"
msg_ok "Network Connected: ${BL}$(hostname -I)"
wget -q --tries=10 --timeout=5 --spider http://google.com
wget -q --tries=10 --timeout=5 --spider https://google.com
if [[ $? -eq 0 ]]; then
msg_ok "Internet Online"
else