From be2d494fcf9fa7e82da23dda99c10566b8a3fb3a Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Wed, 12 Dec 2018 14:55:09 -0500 Subject: [PATCH 1/2] Don't show web version in pihole -v output if not installed Signed-off-by: Mcat12 --- advanced/Scripts/version.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/advanced/Scripts/version.sh b/advanced/Scripts/version.sh index 7dfa1a90..6d0e8c48 100755 --- a/advanced/Scripts/version.sh +++ b/advanced/Scripts/version.sh @@ -136,8 +136,16 @@ errorOutput() { } defaultOutput() { + # Source the setupvars config file + # shellcheck disable=SC1091 + . /etc/pihole/setupVars.conf + versionOutput "pi-hole" "$@" - versionOutput "AdminLTE" "$@" + + if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then + versionOutput "AdminLTE" "$@" + fi + versionOutput "FTL" "$@" } From ed5869646f518ebbd289a11016ad46e28297f724 Mon Sep 17 00:00:00 2001 From: Mark Drobnak Date: Thu, 27 Dec 2018 16:37:10 -0500 Subject: [PATCH 2/2] Use source instead of dot for setupVars Signed-off-by: Mark Drobnak --- advanced/Scripts/version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/version.sh b/advanced/Scripts/version.sh index 6d0e8c48..f6d4d344 100755 --- a/advanced/Scripts/version.sh +++ b/advanced/Scripts/version.sh @@ -138,7 +138,7 @@ errorOutput() { defaultOutput() { # Source the setupvars config file # shellcheck disable=SC1091 - . /etc/pihole/setupVars.conf + source /etc/pihole/setupVars.conf versionOutput "pi-hole" "$@"