From 0a8761ee68c4d6b79201d52793dd4d1aefe60e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Wed, 6 Jul 2022 22:51:39 +0200 Subject: [PATCH] Rename PH_TEST to SKIP_INSTALL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- advanced/Scripts/webpage.sh | 4 ++-- automated install/basic-install.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 279de9e9..29c53bd6 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -24,8 +24,8 @@ readonly gravityDBfile="/etc/pihole/gravity.db" # Source install script for ${setupVars}, ${PI_HOLE_BIN_DIR} and valid_ip() readonly PI_HOLE_FILES_DIR="/etc/.pihole" -# shellcheck disable=SC2034 # used in basic-install -PH_TEST="true" +# shellcheck disable=SC2034 # used in basic-install to source the script without running it +SKIP_INSTALL="true" source "${PI_HOLE_FILES_DIR}/automated install/basic-install.sh" utilsfile="/opt/pihole/utils.sh" diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 9680e9f9..91f7f392 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2860,6 +2860,8 @@ main() { fi } -if [[ "${PH_TEST}" != true ]] ; then +# allow to source this script without running it +# used in docker-pihole and webpage.sh +if [[ "${SKIP_INSTALL}" != true ]] ; then main "$@" fi