From bd0b226f61a14d90ae41e2a8777d6955ecd761b4 Mon Sep 17 00:00:00 2001 From: billz Date: Sat, 8 Feb 2025 01:18:47 -0800 Subject: [PATCH 1/2] Adds -k --check option to install loader --- installers/raspbian.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/installers/raspbian.sh b/installers/raspbian.sh index 8d8c669a..0835f48b 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -54,6 +54,7 @@ OPTIONS: -p, --path Used with -d, --update, sets the existing install path -i, --insiders Installs from the Insiders Edition (RaspAP/raspap-insiders) -m, --minwrite Configures a microSD card for minimum write operation +-k, --check Sets the connectivity check flag (default is 1=perform check) -v, --version Outputs release info and exits -n, --uninstall Loads and executes the uninstaller -h, --help Outputs usage notes and exits @@ -81,13 +82,15 @@ EOF set -eo pipefail function _main() { + _parse_params "$@" _setup_colors - _check_internet + if [ "${check}" == 1 ]; then + _check_internet + fi # set defaults repo="RaspAP/raspap-webgui" # override with -r, --repo option repo_common="$repo" - _parse_params "$@" _log_output _load_installer } @@ -105,6 +108,7 @@ function _parse_params() { minwrite=0 acctoken="" path="" + check=1 while :; do case "${1-}" in @@ -175,6 +179,10 @@ function _parse_params() { path="$2" shift ;; + -k|--check) + check="$2" + shift + ;; -v|--version) _version ;; From 41ce72775ecd28e53ed8930b2b71eb4b4f4cad86 Mon Sep 17 00:00:00 2001 From: billz Date: Sat, 8 Feb 2025 01:41:43 -0800 Subject: [PATCH 2/2] Set default repo at top of _main() --- installers/raspbian.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/installers/raspbian.sh b/installers/raspbian.sh index 0835f48b..27f576fb 100755 --- a/installers/raspbian.sh +++ b/installers/raspbian.sh @@ -82,15 +82,16 @@ EOF set -eo pipefail function _main() { + # set defaults + repo="RaspAP/raspap-webgui" # override with -r, --repo option + repo_common="$repo" + _parse_params "$@" _setup_colors if [ "${check}" == 1 ]; then _check_internet fi - # set defaults - repo="RaspAP/raspap-webgui" # override with -r, --repo option - repo_common="$repo" _log_output _load_installer }