Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/andreijiroh-dev/bootstrap-scripts-linux. Shell scripts and Ansible playbooks to setup a fresh Linux install post-install.
Something went wrong. Try again.
853 B · 37 lines
Shell
at commit 9624e373
1234567891011121314151617181920212223242526272829303132333435363738#!/usr/bin/env bash# Copyright (c) Andrei Jiroh Halili# SPDX-License-Identifier: MPL-2.0set -e
if [[ $DEBUG != "" ]]; then set -xfi
. "$(dirname $0)/lib/import-sh"
# Ideally we want to use curl, but on some installs we# only have wget. Detect and use what's available.CURL=if type curl >/dev/null; then CURL="curl -fsSL"elif type wget >/dev/null; then CURL="wget -q -O-"fiif [ -z "$CURL" ]; then echo "The installer needs either curl or wget to download files." echo "Please install either curl or wget to proceed." exit 1fi
PING_SITE=${PING_SITE:-"https://proxyparty.recaptime.dev"}RC=0TEST_OUT=$($CURL "$PING_SITE" 2>&1) || RC=$?
if [ $RC != 0 ]; then echo "The installer cannot reach $TEST_URL" echo "Please make sure that your machine has internet access." echo "Test output:" echo $TEST_OUT exit 1fiexport CURL