From f1b34887f82789433f18f03a72d10e2b63013470 Mon Sep 17 00:00:00 2001 From: Adam Hill Date: Tue, 16 Oct 2018 19:14:02 -0500 Subject: [PATCH 1/3] The debug printing logic was inverted here. Left on without debug enabled, turned off when debug was enabled Signed-off-by: Adam Hill --- bash_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash_functions.sh b/bash_functions.sh index 7da4922..cdd5a95 100644 --- a/bash_functions.sh +++ b/bash_functions.sh @@ -248,7 +248,7 @@ setup_web_password() { else pihole -a -p "$PASS" "$PASS" fi - if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then + if [ "${PH_VERBOSE:-0}" -lt 1 ] ; then # Turn bash debug back off after print password setup # (subshell to null hides printing output) { set +x; } 2>/dev/null From c2903241859d6794a377d2a1d5dd4d94d4421f03 Mon Sep 17 00:00:00 2001 From: Adam Hill Date: Tue, 16 Oct 2018 19:55:52 -0500 Subject: [PATCH 2/3] Change password logic completely to avoid any extra debug prints Signed-off-by: Adam Hill --- README.md | 2 +- bash_functions.sh | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9dfc3a9..0dbc189 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ docker run -d \ pihole/pihole:latest echo -n "Your password for https://${IP}/admin/ is " -docker logs pihole 2> /dev/null | grep 'password:' +docker logs pihole 2> /dev/null | grep 'password' ``` **This is just an example and might need changing.** Volumes are stored in the directory `$DOCKER_CONFIGS` and are recommended for persisting data across docker re-creations for updating images. As mentioned on line 2, the auto `IP_LOOKUP` variable may not work for VPN tunnel interfaces. diff --git a/bash_functions.sh b/bash_functions.sh index cdd5a95..43fc397 100644 --- a/bash_functions.sh +++ b/bash_functions.sh @@ -242,16 +242,21 @@ generate_password() { setup_web_password() { PASS="$1" # Turn bash debug on while setting up password (to print it) - set -x if [[ "$PASS" == "" ]] ; then echo "" | pihole -a -p else + echo "Setting password: ${PASS}" + set -x pihole -a -p "$PASS" "$PASS" fi - if [ "${PH_VERBOSE:-0}" -lt 1 ] ; then - # Turn bash debug back off after print password setup - # (subshell to null hides printing output) - { set +x; } 2>/dev/null + # Turn bash debug back off after print password setup + # (subshell to null hides printing output) + { set +x; } 2>/dev/null + + # To avoid printing this if conditional in bash debug, turn off debug above.. + # then re-enable debug if necessary (more code but cleaner printed output) + if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then + set -x fi } From cb87448371815133832ac38e429485a9635178bd Mon Sep 17 00:00:00 2001 From: Adam Hill Date: Sun, 21 Oct 2018 15:08:23 -0500 Subject: [PATCH 3/3] Long awaited synology audit error fix ;) Signed-off-by: Adam Hill --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 50fae9a..3f70673 100755 --- a/install.sh +++ b/install.sh @@ -42,6 +42,11 @@ distro_check # fix permission denied to resolvconf post-inst /etc/resolv.conf moby/moby issue #1297 apt-get -y install debconf-utils && echo resolvconf resolvconf/linkify-resolvconf boolean false | debconf-set-selections +# fix error AUDIT: Allow login in non-init namespaces +# Credit to https://github.com/sequenceiq/docker-pam/blob/master/ubuntu-14.04/Dockerfile +apt-get -y build-dep pam && +export CONFIGURE_OPTS=--disable-audit && cd /tmp && apt-get -b source pam && dpkg -i libpam-doc*.deb libpam-modules*.deb libpam-runtime*.deb libpam0g*.deb + # Tried this - unattended causes starting services during a build, should probably PR a flag to shut that off and switch to that #bash -ex "./${PIHOLE_INSTALL}" --unattended install_dependent_packages INSTALLER_DEPS[@]