New install on Raspberry Pi OS on ESXi Virtual Machine fails to install correctly

Yes, this has fixed it.
I ran

sudo apt install libc6:amd64

and then

curl -sSL https://install.pi-hole.net | bash

and went through the install as normal and everything is working as expected.

It comes from the linker, but that already seems to have been clarified.

For which architecture is this ISO? Not for x86_64, right? Looking at this discussion, it very much looks like your virtualization is telling Pi-hole that it is an x86_64 device, however, the operating system isn't able to execute x86_64 code (you made that now possible by installing the amd64 version of libc6).

The ISO download claims it's for x86.
Here's where I got it from: https://www.raspberrypi.org/software/raspberry-pi-desktop/

The VM was setup to run Debian GNU/Linux 10 (64-bit). It's very possible that when those options are selected that it's virtualizing something that doesn't match up with the ISO out of the box?

I hate to admit that I don't know how to tell exactly what ESXi is doing behind the pretty GUI, but just slightly less than I hate pretending like I know more than I actually do.. especially on the internet.

I believed this was resolved with below ?

The software on that ISO is still 32 bits i386 same as the armhf architecture on Raspi's.

Ah yes x86 (not x86_64) will be 32 bit. This is also what @deHakkelaar.

Well, apparently not, he surely tried to install the latest version, however,

@rmurwin Could you tell us the output of the command below so we can look at fixing this in the future?

sudo dpkg --print-architecture

Thanks!

running sudo dpkg --print-architecture results in i386

And uname -m please?

running uname -m results in x86_64

Well, in this case, the 32 bit binary should have been selected. @DanSchaper do you see an issue with the logic I added in the referenced PR?

Looks like the logic is fine, can try using =~ instead of == for checking against i386 at pi-hole/automated install/basic-install.sh at 4a75566a3b4701d8d984e13d50c969bc97eb5553 ยท pi-hole/pi-hole ยท GitHub, I can do a quick diff patch or a test branch and have @rmurwin curl in that raw.githubusercontent.com that will be created for the branch?

dan@Viking-1:~$ bash -x b.sh
+ get_binary_name
+ local machine
++ uname -m
+ machine=x86_64
+ local 'str=Detecting architecture'
+ echo -ne '   Detecting architecture...'
   Detecting architecture...+ [[ x86_64 == \a\r\m* ]]
+ [[ x86_64 == *\a\a\r\c\h* ]]
+ [[ x86_64 == \p\p\c ]]
+ [[ x86_64 == \x\8\6\_\6\4 ]]
+ local dpkgarch
+ dpkgarch=i386
+ [[ i386 =~ i386 ]]
+ echo -e '   Detected 32bit (i686) architecture'
   Detected 32bit (i686) architecture
+ binary=pihole-FTL-linux-x86_32

That'd be awesome. Is there any benefit in using =~ here? I'm asking because a fix I do not understand doesn't really feel like a fix to me :wink:

It's a regex match instead of a straight string comparison. Without seeing the actual output from the string comparison I can't really say if it's an improvement or not but something is causing the comparison to fail.

The better test would be to set up a new VM and then run:

curl -sSL https://install.pi-hole.net -o /tmp/install.sh
sudo bash -x /tmp/install.sh

With the intent that we capture the actual comparison like:

+ [[ x86_64 == *\a\a\r\c\h* ]]
+ [[ x86_64 == \p\p\c ]]
+ [[ x86_64 == \x\8\6\_\6\4 ]]

I can set up a vm and do that if you tell me what to run

Try the above first.

It failed similar to the way that got me here:

pi@Pi-hole2:~ $ curl -sSL https://install.pi-hole.net -o /tmp/install.sh
pi@Pi-hole2:~ $ sudo bash -x /tmp/install.sh
+ set -e
+ export PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ cat
+ DNS_SERVERS='Google (ECS);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
OpenDNS (ECS, DNSSEC);208.67.222.222;208.67.220.220;2620:119:35::35;2620:119:53::53
Level3;4.2.2.1;4.2.2.2;;
Comodo;8.26.56.26;8.20.247.20;;
DNS.WATCH;84.200.69.80;84.200.70.40;2001:1608:10:25:0:0:1c04:b12f;2001:1608:10:25:0:0:9249:d69b
Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9
Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10
Quad9 (filtered + ECS);9.9.9.11;149.112.112.11;2620:fe::11;2620:fe::fe:11
Cloudflare;1.1.1.1;1.0.0.1;2606:4700:4700::1111;2606:4700:4700::1001'
+ installLogLoc=/etc/pihole/install.log
+ setupVars=/etc/pihole/setupVars.conf
+ lighttpdConfig=/etc/lighttpd/lighttpd.conf
+ coltable=/opt/pihole/COL_TABLE
+ webroot=/var/www/html
+ webInterfaceGitUrl=https://github.com/pi-hole/AdminLTE.git
+ webInterfaceDir=/var/www/html/admin
+ piholeGitUrl=https://github.com/pi-hole/pi-hole.git
+ PI_HOLE_LOCAL_REPO=/etc/.pihole
+ PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)
+ PI_HOLE_INSTALL_DIR=/opt/pihole
+ PI_HOLE_CONFIG_DIR=/etc/pihole
+ PI_HOLE_BIN_DIR=/usr/local/bin
+ PI_HOLE_BLOCKPAGE_DIR=/var/www/html/pihole
+ '[' -z '' ']'
+ useUpdateVars=false
+ adlistFile=/etc/pihole/adlists.list
+ IPV4_ADDRESS=
+ IPV6_ADDRESS=
+ QUERY_LOGGING=true
+ INSTALL_WEB_INTERFACE=true
+ PRIVACY_LEVEL=0
+ CACHE_SIZE=10000
+ '[' -z root ']'
+ '[' -t 0 ']'
++ stty size
+ screen_size='30 120'
+ printf -v rows %d 30
+ printf -v columns %d 120
+ r=15
+ c=60
+ r=20
+ c=70
+ reconfigure=false
+ runUnattended=false
+ INSTALL_WEB_SERVER=true
+ [[ -f /opt/pihole/COL_TABLE ]]
+ COL_NC='\e[0m'
+ COL_LIGHT_GREEN='\e[1;32m'
+ COL_LIGHT_RED='\e[1;31m'
+ TICK='[\e[1;32mโœ“\e[0m]'
+ CROSS='[\e[1;31mโœ—\e[0m]'
+ INFO='[i]'
+ DONE='\e[1;32m done!\e[0m'
+ OVER='\r\033[K'
+ counter=0
+ [[ '' != true ]]
+ main
+ local 'str=Root user check'
+ printf '\n'

+ [[ 0 -eq 0 ]]
+ printf '  %b %s\n' '[\e[1;32mโœ“\e[0m]' 'Root user check'
  [โœ“] Root user check
+ show_ascii_berry
+ echo -e '
        \e[1;32m.;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           '\''ccll:;ll .oooodc
             .;cll.;;looo:.
                 \e[1;31m.. '\'','\''.
                .'\'',,,,,,'\''.
              .'\'',,,,,,,,,,.
            .'\'',,,,,,,,,,,,....
          ....'\'''\'''\'',,,,,,,'\''.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'\''......
            ....'\'',,,,,,,,,,,,.
               .'\'',,,,,,,,,'\''.
                .'\'',,,,,,'\''.
                  ..'\'''\'''\''.\e[0m
'

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

+ make_temporary_log
++ mktemp /tmp/pihole_temp.XXXXXX
+ TEMPLOG=/tmp/pihole_temp.O1JRuQ
+ exec
+ rm /tmp/pihole_temp.O1JRuQ
+ distro_check
+ is_command apt-get
+ local check_command=apt-get
+ command -v apt-get
+ PKG_MANAGER=apt-get
+ UPDATE_PKG_CACHE='apt-get update'
+ PKG_INSTALL=("${PKG_MANAGER}" -qq --no-install-recommends install)
+ PKG_COUNT='apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+ APT_SOURCES=/etc/apt/sources.list
+ awk 'BEGIN{a=1;b=0}/bionic main/{a=0}/bionic.*universe/{b=1}END{exit a + b}' /etc/apt/sources.list
+ update_package_cache
+ local 'str=Update local cache of available packages'
+ printf '  %b %s...' '[i]' 'Update local cache of available packages'
  [i] Update local cache of available packages...+ eval 'apt-get update'
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Update local cache of available packages'
  [โœ“] Update local cache of available packages
+ apt-cache show iproute2
+ iproute_pkg=iproute2
+ is_command php
+ local check_command=php
+ command -v php
+ [[ '' != true ]]
+ apt-cache show php
+ phpVer=php
+ apt-cache show php-sqlite3
+ phpSqlite=sqlite3
+ INSTALLER_DEPS=(dhcpcd5 git "${iproute_pkg}" whiptail dnsutils)
+ PIHOLE_DEPS=(cron curl iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data libcap2)
+ PIHOLE_WEB_DEPS=(lighttpd "${phpVer}-common" "${phpVer}-cgi" "${phpVer}-${phpSqlite}" "${phpVer}-xml" "${phpVer}-json" "${phpVer}-intl")
+ LIGHTTPD_USER=www-data
+ LIGHTTPD_GROUP=www-data
+ LIGHTTPD_CFG=lighttpd.conf.debian
+ [[ -f /etc/pihole/setupVars.conf ]]
+ notify_package_updates_available
+ local 'str=Checking apt-get for upgraded packages'
+ printf '\n  %b %s...' '[i]' 'Checking apt-get for upgraded packages'

  [i] Checking apt-get for upgraded packages...++ eval 'apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
+++ grep -c '^Inst'
+++ apt-get -s -o Debug::NoLocking=true upgrade
+ updatesToInstall=313
++ uname -r
+ [[ -d /lib/modules/4.19.0-8-amd64 ]]
+ [[ 313 -eq 0 ]]
+ printf '%b  %b %s... %s updates available\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Checking apt-get for upgraded packages' 313
  [โœ“] Checking apt-get for upgraded packages... 313 updates available
+ printf '  %b %bIt is recommended to update your OS after installing the Pi-hole!%b\n\n' '[i]' '\e[1;32m' '\e[0m'
  [i] It is recommended to update your OS after installing the Pi-hole!

+ install_dependent_packages dhcpcd5 git iproute2 whiptail dnsutils
+ counter=1
+ [[ 1 == 1 ]]
+ printf '  %b Installer Dependency checks...\n' '[i]'
  [i] Installer Dependency checks...
+ declare -a installArray
+ is_command apt-get
+ local check_command=apt-get
+ command -v apt-get
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' dhcpcd5
  [i] Checking for dhcpcd5...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dhcpcd5
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' dhcpcd5
  [โœ“] Checking for dhcpcd5
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' git
  [i] Checking for git...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' git
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' git
  [โœ“] Checking for git
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' iproute2
  [i] Checking for iproute2...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' iproute2
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' iproute2
  [โœ“] Checking for iproute2
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' whiptail
  [i] Checking for whiptail...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' whiptail
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' whiptail
  [โœ“] Checking for whiptail
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' dnsutils
  [i] Checking for dnsutils...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dnsutils
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' dnsutils
  [i] Checking for dnsutils (will be installed)
+ installArray+=("${i}")
+ [[ 1 -gt 0 ]]
+ test_dpkg_lock
+ i=0
+ fuser /var/lib/dpkg/lock
+ return 0
+ printf '  %b Processing %s install(s) for: %s, please wait...\n' '[i]' apt-get dnsutils
  [i] Processing apt-get install(s) for: dnsutils, please wait...
+ tr ' ' -
+ printf '%*s\n' 120 ''
------------------------------------------------------------------------------------------------------------------------+ apt-get -qq --no-install-recommends install dnsutils
(Reading database ... 142069 files and directories currently installed.)
Preparing to unpack .../0-bind9-host_1%3a9.11.5.P4+dfsg-5.1+deb10u2_i386.deb ...
Unpacking bind9-host (1:9.11.5.P4+dfsg-5.1+deb10u2) over (1:9.11.5.P4+dfsg-5.1) ...
Preparing to unpack .../1-libbind9-161_1%3a9.11.5.P4+dfsg-5.1+deb10u2_i386.deb ...
Unpacking libbind9-161:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) over (1:9.11.5.P4+dfsg-5.1) ...
Preparing to unpack .../2-libisccfg163_1%3a9.11.5.P4+dfsg-5.1+deb10u2_i386.deb ...
Unpacking libisccfg163:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) over (1:9.11.5.P4+dfsg-5.1) ...
Preparing to unpack .../3-libisccc161_1%3a9.11.5.P4+dfsg-5.1+deb10u2_i386.deb ...
Unpacking libisccc161:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) over (1:9.11.5.P4+dfsg-5.1) ...
Preparing to unpack .../4-libdns1104_1%3a9.11.5.P4+dfsg-5.1+deb10u2_i386.deb ...
Unpacking libdns1104:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) over (1:9.11.5.P4+dfsg-5.1) ...
Preparing to unpack .../5-libisc1100_1%3a9.11.5.P4+dfsg-5.1+deb10u2_i386.deb ...
Unpacking libisc1100:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) over (1:9.11.5.P4+dfsg-5.1) ...
Preparing to unpack .../6-liblwres161_1%3a9.11.5.P4+dfsg-5.1+deb10u2_i386.deb ...
Unpacking liblwres161:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) over (1:9.11.5.P4+dfsg-5.1) ...
Selecting previously unselected package libirs161:i386.
Preparing to unpack .../7-libirs161_1%3a9.11.5.P4+dfsg-5.1+deb10u2_i386.deb ...
Unpacking libirs161:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Selecting previously unselected package dnsutils.
Preparing to unpack .../8-dnsutils_1%3a9.11.5.P4+dfsg-5.1+deb10u2_i386.deb ...
Unpacking dnsutils (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up libisc1100:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up liblwres161:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up libisccc161:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up libdns1104:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up libisccfg163:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up libbind9-161:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up libirs161:i386 (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up bind9-host (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Setting up dnsutils (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Processing triggers for libc-bin (2.28-10) ...
Processing triggers for man-db (2.8.5-2) ...
+ tr ' ' -
+ printf '%*s\n' 120 ''
------------------------------------------------------------------------------------------------------------------------
+ return
+ os_check
+ '[' '' '!=' true ']'
+ local remote_os_domain valid_os valid_version valid_response detected_os detected_version display_warning cmdResult digReturnCode response
+ remote_os_domain=versions.pi-hole.net
++ tr -d '"'
++ cut -d = -f2
++ grep '\bID\b' /etc/os-release
+ detected_os=debian
++ tr -d '"'
++ cut -d = -f2
++ grep VERSION_ID /etc/os-release
+ detected_version=10
++ dig +short -t txt versions.pi-hole.net @ns1.pi-hole.net
++ echo 0
+ cmdResult='"Raspbian=9,10 Ubuntu=16,18,20 Debian=9,10 Fedora=31,32 CentOS=7,8"
0'
+ digReturnCode=0
+ '[' '!' 0 == 0 ']'
+ response='"Raspbian=9,10 Ubuntu=16,18,20 Debian=9,10 Fedora=31,32 CentOS=7,8"'
+ '[' '"Raspbian=9,10 Ubuntu=16,18,20 Debian=9,10 Fedora=31,32 CentOS=7,8"' == 0 ']'
+ IFS=' '
+ read -r -a supportedOS
++ tr -d '"'
++ echo '"Raspbian=9,10 Ubuntu=16,18,20 Debian=9,10 Fedora=31,32 CentOS=7,8"'
+ for distro_and_versions in "${supportedOS[@]}"
+ distro_part=Raspbian
+ versions_part=9,10
+ [[ DEBIAN =~ RASPBIAN ]]
+ for distro_and_versions in "${supportedOS[@]}"
+ distro_part=Ubuntu
+ versions_part=16,18,20
+ [[ DEBIAN =~ UBUNTU ]]
+ for distro_and_versions in "${supportedOS[@]}"
+ distro_part=Debian
+ versions_part=9,10
+ [[ DEBIAN =~ DEBIAN ]]
+ valid_os=true
+ IFS=,
+ read -r -a supportedVer
+ for version in "${supportedVer[@]}"
+ [[ 10 =~ 9 ]]
+ for version in "${supportedVer[@]}"
+ [[ 10 =~ 10 ]]
+ valid_version=true
+ break
+ break
+ '[' true = true ']'
+ '[' true = true ']'
+ '[' '!' '' = false ']'
+ display_warning=false
+ '[' false '!=' false ']'
+ printf '  %b %bSupported OS detected%b\n' '[\e[1;32mโœ“\e[0m]' '\e[1;32m' '\e[0m'
  [โœ“] Supported OS detected
+ checkSelinux
+ local DEFAULT_SELINUX
+ local CURRENT_SELINUX
+ local SELINUX_ENFORCING=0
+ [[ -f /etc/selinux/config ]]
+ echo -e '  [i] SELinux not detected\e[0m'
  [i] SELinux not detected
+ [[ 0 -eq 1 ]]
+ [[ 0 -eq 1 ]]
+ [[ false == false ]]
+ welcomeDialogs
+ whiptail --msgbox --backtitle Welcome --title 'Pi-hole automated installer' '\n\nThis installer will transform your device into a network-wide ad blocker!' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle Plea --title 'Free and open source' '\n\nThe Pi-hole is free, but powered by your donations:  https://pi-hole.net/donate/' 20 70
+ whiptail --msgbox --backtitle 'Initiating network interface' --title 'Static IP Needed' '\n\nThe Pi-hole is a SERVER so it needs a STATIC IP ADDRESS to function properly.

In the next section, you can choose to use your current network settings (DHCP) or to manually edit them.' 20 70
+ install -d -m 755 /etc/pihole/
+ get_available_interfaces
++ cut -d@ -f1
++ cut -d: -f1
++ awk '{print $2}'
++ grep -v lo
++ ip --oneline link show up
+ availableInterfaces=eth0
+ chooseInterface
+ interfacesArray=()
+ local interfacesArray
+ local interfaceCount
+ local chooseInterfaceCmd
+ local chooseInterfaceOptions
+ local firstLoop=1
++ wc -l
+ interfaceCount=1
+ [[ 1 -eq 1 ]]
+ PIHOLE_INTERFACE=eth0
+ setDNS
+ local DNSSettingsCorrect
+ DNSChooseOptions=()
+ local DNSServerCount=0
+ OIFS='
'
+ IFS='
'
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='Google (ECS)'
+ DNSChooseOptions[DNSServerCount]='Google (ECS)'
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='OpenDNS (ECS, DNSSEC)'
+ DNSChooseOptions[DNSServerCount]='OpenDNS (ECS, DNSSEC)'
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName=Level3
+ DNSChooseOptions[DNSServerCount]=Level3
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName=Comodo
+ DNSChooseOptions[DNSServerCount]=Comodo
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName=DNS.WATCH
+ DNSChooseOptions[DNSServerCount]=DNS.WATCH
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='Quad9 (filtered, DNSSEC)'
+ DNSChooseOptions[DNSServerCount]='Quad9 (filtered, DNSSEC)'
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='Quad9 (unfiltered, no DNSSEC)'
+ DNSChooseOptions[DNSServerCount]='Quad9 (unfiltered, no DNSSEC)'
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='Quad9 (filtered + ECS)'
+ DNSChooseOptions[DNSServerCount]='Quad9 (filtered + ECS)'
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName=Cloudflare
+ DNSChooseOptions[DNSServerCount]=Cloudflare
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=Custom
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ IFS='
'
++ whiptail --separate-output --menu 'Select Upstream DNS Provider. To use your own, select Custom.' 20 70 7 'Google (ECS)' '' 'OpenDNS (ECS, DNSSEC)' '' Level3 '' Comodo '' DNS.WATCH '' 'Quad9 (filtered, DNSSEC)' '' 'Quad9 (unfiltered, no DNSSEC)' '' 'Quad9 (filtered + ECS)' '' Cloudflare '' Custom ''
+ DNSchoices=Cloudflare
+ [[ Cloudflare == \C\u\s\t\o\m ]]
+ OIFS='
'
+ IFS='
'
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='Google (ECS)'
+ [[ Cloudflare == \G\o\o\g\l\e\ \(\E\C\S\) ]]
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='OpenDNS (ECS, DNSSEC)'
+ [[ Cloudflare == \O\p\e\n\D\N\S\ \(\E\C\S\,\ \D\N\S\S\E\C\) ]]
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName=Level3
+ [[ Cloudflare == \L\e\v\e\l\3 ]]
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName=Comodo
+ [[ Cloudflare == \C\o\m\o\d\o ]]
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName=DNS.WATCH
+ [[ Cloudflare == \D\N\S\.\W\A\T\C\H ]]
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='Quad9 (filtered, DNSSEC)'
+ [[ Cloudflare == \Q\u\a\d\9\ \(\f\i\l\t\e\r\e\d\,\ \D\N\S\S\E\C\) ]]
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='Quad9 (unfiltered, no DNSSEC)'
+ [[ Cloudflare == \Q\u\a\d\9\ \(\u\n\f\i\l\t\e\r\e\d\,\ \n\o\ \D\N\S\S\E\C\) ]]
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='Quad9 (filtered + ECS)'
+ [[ Cloudflare == \Q\u\a\d\9\ \(\f\i\l\t\e\r\e\d\ \+\ \E\C\S\) ]]
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName=Cloudflare
+ [[ Cloudflare == \C\l\o\u\d\f\l\a\r\e ]]
++ cut '-d;' -f2
+ PIHOLE_DNS_1=1.1.1.1
++ cut '-d;' -f3
+ PIHOLE_DNS_2=1.0.0.1
+ break
+ IFS='
'
+ local DNSIP=1.1.1.1
+ [[ -z 1.0.0.1 ]]
+ DNSIP+=', 1.0.0.1'
+ printf '  %b Using upstream DNS: %s (%s)\n' '[i]' Cloudflare '1.1.1.1, 1.0.0.1'
  [i] Using upstream DNS: Cloudflare (1.1.1.1, 1.0.0.1)
+ chooseBlocklists
+ [[ -f /etc/pihole/adlists.list ]]
+ cmd=(whiptail --separate-output --checklist "Pi-hole relies on third party lists in order to block ads.\\n\\nYou can use the suggestions below, and/or add your own after installation\\n\\nTo deselect any list, use the arrow keys and spacebar" "${r}" "${c}" 5)
+ options=(StevenBlack "StevenBlack's Unified Hosts List" on MalwareDom "MalwareDomains" on)
++ whiptail --separate-output --checklist 'Pi-hole relies on third party lists in order to block ads.\n\nYou can use the suggestions below, and/or add your own after installation\n\nTo deselect any list, use the arrow keys and spacebar' 20 70 5 StevenBlack 'StevenBlack'\''s Unified Hosts List' on MalwareDom MalwareDomains on
+ choices='StevenBlack
MalwareDom'
+ for choice in ${choices}
+ appendToListsFile StevenBlack
+ case $1 in
+ echo https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
+ for choice in ${choices}
+ appendToListsFile MalwareDom
+ case $1 in
+ echo https://mirror1.malwaredomains.com/files/justdomains
+ touch /etc/pihole/adlists.list
+ choices='StevenBlack
MalwareDom'
+ for choice in ${choices}
+ appendToListsFile StevenBlack
+ case $1 in
+ echo https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
+ for choice in ${choices}
+ appendToListsFile MalwareDom
+ case $1 in
+ echo https://mirror1.malwaredomains.com/files/justdomains
+ touch /etc/pihole/adlists.list
+ chmod 644 /etc/pihole/adlists.list
+ use4andor6
+ local useIPv4
+ local useIPv6
+ cmd=(whiptail --separate-output --checklist "Select Protocols (press space to toggle selection)" "${r}" "${c}" 2)
+ options=(IPv4 "Block ads over IPv4" on IPv6 "Block ads over IPv6" on)
++ whiptail --separate-output --checklist 'Select Protocols (press space to toggle selection)' 20 70 2 IPv4 'Block ads over IPv4' on IPv6 'Block ads over IPv6' on
+ choices='IPv4
IPv6'
+ for choice in ${choices}
+ case ${choice} in
+ useIPv4=true
+ for choice in ${choices}
+ case ${choice} in
+ useIPv6=true
+ [[ -n true ]]
+ find_IPv4_information
+ local route
+ local IPv4bare
++ ip route get 8.8.8.8
+ route='8.8.8.8 via 10.0.1.254 dev eth0 src 10.0.1.251 uid 0
    cache '
++ printf 10.0.1.251 uid 0 cache
+ printf -v IPv4bare 10.0.1.251
++ printf 10.0.1.254 dev eth0 src 10.0.1.251 uid 0 cache
+ printf -v IPv4gw 10.0.1.254
+ valid_ip 10.0.1.251
+ local ip=10.0.1.251
+ local stat=1
+ local 'ipv4elem=(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)'
+ local 'portelem=(#([1-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-6]))?'
+ local 'regex=^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)(#([1-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-6]))?$'
+ [[ 10.0.1.251 =~ ^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)(#([1-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-6]))?$ ]]
+ stat=0
+ return 0
++ awk 'END {print}'
++ awk '{print $4}'
++ grep 10.0.1.251/
++ ip -oneline -family inet address show
+ IPV4_ADDRESS=10.0.1.251/8
+ getStaticIPv4Settings
+ local ipSettingsCorrect
+ whiptail --backtitle 'Calibrating network interface' --title 'Static IP Address' --yesno 'Do you want to use your current network settings as a static address?
          IP address:    10.0.1.251/8
          Gateway:       10.0.1.254' 20 70
+ whiptail --msgbox --backtitle 'IP information' --title 'FYI: IP Conflict' 'It is possible your router could still try to assign this IP to a device, which would cause a conflict.  But in most cases the router is smart enough to not do that.
If you are worried, either manually set the address, or modify the DHCP reservation pool so it does not include the IP you want.
It is also possible to use a DHCP reservation, but if you are going to do that, you might as well set a static address.' 20 70
+ setStaticIPv4
+ local IFCFG_FILE
+ local CONNECTION_NAME
+ [[ -r /etc/sysconfig/network/ifcfg-eth0 ]]
+ [[ -f /etc/dhcpcd.conf ]]
+ setDHCPCD
+ grep -q 10.0.1.251/8 /etc/dhcpcd.conf
+ setStaticIPv4
+ local IFCFG_FILE
+ local CONNECTION_NAME
+ [[ -r /etc/sysconfig/network/ifcfg-eth0 ]]
+ [[ -f /etc/dhcpcd.conf ]]
+ setDHCPCD
+ grep -q 10.0.1.251/8 /etc/dhcpcd.conf
+ tee -a /etc/dhcpcd.conf
+ echo 'interface eth0
        static ip_address=10.0.1.251/8
        static routers=10.0.1.254
        static domain_name_servers=1.1.1.1 1.0.0.1'
+ ip addr replace dev eth0 10.0.1.251/8
+ printf '  %b Set IP address to %s\n' '[\e[1;32mโœ“\e[0m]' 10.0.1.251
  [โœ“] Set IP address to 10.0.1.251
+ printf '  %b You may need to restart after the install is complete\n' '[i]'
  [i] You may need to restart after the install is complete
+ return 0
+ [[ -n true ]]
+ useIPv6dialog
+ IPV6_ADDRESSES=($(ip -6 address | grep 'scope global' | awk '{print $2}'))
++ awk '{print $2}'
++ grep 'scope global'
++ ip -6 address
+ [[ ! -z '' ]]
+ [[ ! -z '' ]]
+ printf '  %b Unable to find IPv6 ULA/GUA address, IPv6 adblocking will not be enabled\n' '[i]'
  [i] Unable to find IPv6 ULA/GUA address, IPv6 adblocking will not be enabled
+ IPV6_ADDRESS=
+ [[ ! -z '' ]]
+ printf '  %b IPv4 address: %s\n' '[i]' 10.0.1.251/8
  [i] IPv4 address: 10.0.1.251/8
+ printf '  %b IPv6 address: %s\n' '[i]' ''
  [i] IPv6 address:
+ [[ ! -n true ]]
+ setAdminFlag
+ local WebToggleCommand
+ local WebChooseOptions
+ local WebChoices
+ WebToggleCommand=(whiptail --separate-output --radiolist "Do you wish to install the web admin interface?" "${r}" "${c}" 6)
+ WebChooseOptions=("On (Recommended)" "" on Off "" off)
++ whiptail --separate-output --radiolist 'Do you wish to install the web admin interface?' 20 70 6 'On (Recommended)' '' on Off '' off
+ WebChoices='On (Recommended)'
+ case ${WebChoices} in
+ printf '  %b Web Interface On\n' '[i]'
  [i] Web Interface On
+ INSTALL_WEB_INTERFACE=true
+ [[ true == true ]]
+ local i php_modules
+ for i in "${PIHOLE_WEB_DEPS[@]}"
+ [[ lighttpd == \p\h\p* ]]
+ for i in "${PIHOLE_WEB_DEPS[@]}"
+ [[ php-common == \p\h\p* ]]
+ [[ php-common != *\-\c\o\m\m\o\n ]]
+ for i in "${PIHOLE_WEB_DEPS[@]}"
+ [[ php-cgi == \p\h\p* ]]
+ [[ php-cgi != *\-\c\o\m\m\o\n ]]
+ [[ php-cgi != *\-\c\g\i ]]
+ for i in "${PIHOLE_WEB_DEPS[@]}"
+ [[ php-sqlite3 == \p\h\p* ]]
+ [[ php-sqlite3 != *\-\c\o\m\m\o\n ]]
+ [[ php-sqlite3 != *\-\c\g\i ]]
+ php_modules+=' sqlite3'
+ for i in "${PIHOLE_WEB_DEPS[@]}"
+ [[ php-xml == \p\h\p* ]]
+ [[ php-xml != *\-\c\o\m\m\o\n ]]
+ [[ php-xml != *\-\c\g\i ]]
+ php_modules+=' xml'
+ for i in "${PIHOLE_WEB_DEPS[@]}"
+ [[ php-json == \p\h\p* ]]
+ [[ php-json != *\-\c\o\m\m\o\n ]]
+ [[ php-json != *\-\c\g\i ]]
+ php_modules+=' json'
+ for i in "${PIHOLE_WEB_DEPS[@]}"
+ [[ php-intl == \p\h\p* ]]
+ [[ php-intl != *\-\c\o\m\m\o\n ]]
+ [[ php-intl != *\-\c\g\i ]]
+ php_modules+=' intl'
+ WebToggleCommand=(whiptail --separate-output --radiolist "Do you wish to install the web server (lighttpd) and required PHP modules?\\n\\nNB: If you disable this, and, do not have an existing web server and required PHP modules (${php_modules# }) installed, the web interface will not function. Additionally the web server user needs to be member of the \"pihole\" group for full functionality." "${r}" "${c}" 6)
+ WebChooseOptions=("On (Recommended)" "" on Off "" off)
++ whiptail --separate-output --radiolist 'Do you wish to install the web server (lighttpd) and required PHP modules?\n\nNB: If you disable this, and, do not have an existing web server and required PHP modules (sqlite3 xml json intl) installed, the web interface will not function. Additionally the web server user needs to be member of the "pihole" group for full functionality.' 20 70 6 'On (Recommended)' '' on Off '' off
+ WebChoices='On (Recommended)'
+ case ${WebChoices} in
+ printf '  %b Web Server On\n' '[i]'
  [i] Web Server On
+ INSTALL_WEB_SERVER=true
+ setLogging
+ local LogToggleCommand
+ local LogChooseOptions
+ local LogChoices
+ LogToggleCommand=(whiptail --separate-output --radiolist "Do you want to log queries?" "${r}" "${c}" 6)
+ LogChooseOptions=("On (Recommended)" "" on Off "" off)
++ whiptail --separate-output --radiolist 'Do you want to log queries?' 20 70 6 'On (Recommended)' '' on Off '' off
+ LogChoices='On (Recommended)'
+ case ${LogChoices} in
+ printf '  %b Logging On.\n' '[i]'
  [i] Logging On.
+ QUERY_LOGGING=true
+ setPrivacyLevel
+ local LevelCommand
+ local LevelOptions
+ LevelCommand=(whiptail --separate-output --radiolist "Select a privacy mode for FTL. https://docs.pi-hole.net/ftldns/privacylevels/" "${r}" "${c}" 6)
+ LevelOptions=("0" "Show everything" on "1" "Hide domains" off "2" "Hide domains and clients" off "3" "Anonymous mode" off)
++ whiptail --separate-output --radiolist 'Select a privacy mode for FTL. https://docs.pi-hole.net/ftldns/privacylevels/' 20 70 6 0 'Show everything' on 1 'Hide domains' off 2 'Hide domains and clients' off 3 'Anonymous mode' off
+ PRIVACY_LEVEL=0
+ printf '  %b Privacy level %d' '[i]' 0
  [i] Privacy level 0+ clone_or_update_repos
+ [[ false == true ]]
+ getGitFiles /etc/.pihole https://github.com/pi-hole/pi-hole.git
+ local directory=/etc/.pihole
+ local remoteRepo=https://github.com/pi-hole/pi-hole.git
+ local 'str=Check for existing repository in /etc/.pihole'
+ printf '  %b %s...' '[i]' 'Check for existing repository in /etc/.pihole'
  [i] Check for existing repository in /etc/.pihole...+ is_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local rc
+ [[ -d /etc/.pihole ]]
+ rc=1
+ popd
+ return 1
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;31mโœ—\e[0m]' 'Check for existing repository in /etc/.pihole'
  [โœ—] Check for existing repository in /etc/.pihole
+ make_repo /etc/.pihole https://github.com/pi-hole/pi-hole.git
+ local directory=/etc/.pihole
+ local remoteRepo=https://github.com/pi-hole/pi-hole.git
+ str='Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole'
+ printf '  %b %s...' '[i]' 'Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole'
  [i] Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole...+ [[ -d /etc/.pihole ]]
+ git clone -q --depth 20 https://github.com/pi-hole/pi-hole.git /etc/.pihole
+ pushd /etc/.pihole
++ git rev-parse --abbrev-ref HEAD
+ curBranch=master
+ [[ master == \m\a\s\t\e\r ]]
++ git describe --abbrev=0 --tags
+ git reset --hard v5.2.1
HEAD is now at 0d8ece1 Merge pull request #3889 from pi-hole/release/v5.2.1
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole'
  [โœ“] Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole
+ chmod -R a+rX /etc/.pihole
+ popd
+ return 0
+ echo ''

+ return 0
+ [[ true == true ]]
+ getGitFiles /var/www/html/admin https://github.com/pi-hole/AdminLTE.git
+ local directory=/var/www/html/admin
+ local remoteRepo=https://github.com/pi-hole/AdminLTE.git
+ local 'str=Check for existing repository in /var/www/html/admin'
+ printf '  %b %s...' '[i]' 'Check for existing repository in /var/www/html/admin'
  [i] Check for existing repository in /var/www/html/admin...+ is_repo /var/www/html/admin
+ local directory=/var/www/html/admin
+ local rc
+ [[ -d /var/www/html/admin ]]
+ rc=1
+ popd
+ return 1
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;31mโœ—\e[0m]' 'Check for existing repository in /var/www/html/admin'
  [โœ—] Check for existing repository in /var/www/html/admin
+ make_repo /var/www/html/admin https://github.com/pi-hole/AdminLTE.git
+ local directory=/var/www/html/admin
+ local remoteRepo=https://github.com/pi-hole/AdminLTE.git
+ str='Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin'
+ printf '  %b %s...' '[i]' 'Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin'
  [i] Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin...+ [[ -d /var/www/html/admin ]]
+ git clone -q --depth 20 https://github.com/pi-hole/AdminLTE.git /var/www/html/admin
+ pushd /var/www/html/admin
++ git rev-parse --abbrev-ref HEAD
+ curBranch=master
+ [[ master == \m\a\s\t\e\r ]]
++ git describe --abbrev=0 --tags
+ git reset --hard v5.2.1
HEAD is now at 8ac95be Merge pull request #1647 from pi-hole/release/v5.2.1
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin'
  [โœ“] Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin
+ chmod -R a+rX /var/www/html/admin
+ popd
+ return 0
+ echo ''

+ return 0
+ dep_install_list=("${PIHOLE_DEPS[@]}")
+ local dep_install_list
+ [[ true == true ]]
+ dep_install_list+=("${PIHOLE_WEB_DEPS[@]}")
+ install_dependent_packages cron curl iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data libcap2 lighttpd php-common php-cgi php-sqlite3 php-xml php-json php-intl
+ counter=2
+ [[ 2 == 1 ]]
+ printf '  %b Main Dependency checks...\n' '[i]'
  [i] Main Dependency checks...
+ declare -a installArray
+ is_command apt-get
+ local check_command=apt-get
+ command -v apt-get
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' cron
  [i] Checking for cron...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' cron
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' cron
  [โœ“] Checking for cron
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' curl
  [i] Checking for curl...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' curl
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' curl
  [โœ“] Checking for curl
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' iputils-ping
  [i] Checking for iputils-ping...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' iputils-ping
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' iputils-ping
  [โœ“] Checking for iputils-ping
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' lsof
  [i] Checking for lsof...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' lsof
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' lsof
  [โœ“] Checking for lsof
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' netcat
  [i] Checking for netcat...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' netcat
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' netcat
  [i] Checking for netcat (will be installed)
+ installArray+=("${i}")
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' psmisc
  [i] Checking for psmisc...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' psmisc
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' psmisc
  [โœ“] Checking for psmisc
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' sudo
  [i] Checking for sudo...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' sudo
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' sudo
  [โœ“] Checking for sudo
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' unzip
  [i] Checking for unzip...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' unzip
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' unzip
  [โœ“] Checking for unzip
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' wget
  [i] Checking for wget...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' wget
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' wget
  [โœ“] Checking for wget
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' idn2
  [i] Checking for idn2...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' idn2
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' idn2
  [i] Checking for idn2 (will be installed)
+ installArray+=("${i}")
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' sqlite3
  [i] Checking for sqlite3...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' sqlite3
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' sqlite3
  [i] Checking for sqlite3 (will be installed)
+ installArray+=("${i}")
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' libcap2-bin
  [i] Checking for libcap2-bin...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' libcap2-bin
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' libcap2-bin
  [โœ“] Checking for libcap2-bin
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' dns-root-data
  [i] Checking for dns-root-data...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dns-root-data
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' dns-root-data
  [i] Checking for dns-root-data (will be installed)
+ installArray+=("${i}")
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' libcap2
  [i] Checking for libcap2...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' libcap2
+ printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' libcap2
  [โœ“] Checking for libcap2
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' lighttpd
  [i] Checking for lighttpd...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' lighttpd
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' lighttpd
  [i] Checking for lighttpd (will be installed)
+ installArray+=("${i}")
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php-common
  [i] Checking for php-common...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php-common
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' php-common
  [i] Checking for php-common (will be installed)
+ installArray+=("${i}")
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php-cgi
  [i] Checking for php-cgi...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php-cgi
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' php-cgi
  [i] Checking for php-cgi (will be installed)
+ installArray+=("${i}")
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php-sqlite3
  [i] Checking for php-sqlite3...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php-sqlite3
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' php-sqlite3
  [i] Checking for php-sqlite3 (will be installed)
+ installArray+=("${i}")
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php-xml
  [i] Checking for php-xml...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php-xml
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' php-xml
  [i] Checking for php-xml (will be installed)
+ installArray+=("${i}")
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php-json
  [i] Checking for php-json...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php-json
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' php-json
  [i] Checking for php-json (will be installed)
+ installArray+=("${i}")
+ for i in "$@"
+ printf '  %b Checking for %s...' '[i]' php-intl
  [i] Checking for php-intl...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php-intl
+ printf '%b  %b Checking for %s (will be installed)\n' '\r\033[K' '[i]' php-intl
  [i] Checking for php-intl (will be installed)
+ installArray+=("${i}")
+ [[ 11 -gt 0 ]]
+ test_dpkg_lock
+ i=0
+ fuser /var/lib/dpkg/lock
+ return 0
+ printf '  %b Processing %s install(s) for: %s, please wait...\n' '[i]' apt-get 'netcat idn2 sqlite3 dns-root-data lighttpd php-common php-cgi php-sqlite3 php-xml php-json php-intl'
  [i] Processing apt-get install(s) for: netcat idn2 sqlite3 dns-root-data lighttpd php-common php-cgi php-sqlite3 php-xml php-json php-intl, please wait...
+ tr ' ' -
+ printf '%*s\n' 120 ''
------------------------------------------------------------------------------------------------------------------------
+ apt-get -qq --no-install-recommends install netcat idn2 sqlite3 dns-root-data lighttpd php-common php-cgi php-sqlite3 php-xml php-json php-intl
Selecting previously unselected package netcat-traditional.
(Reading database ... 142091 files and directories currently installed.)
Preparing to unpack .../00-netcat-traditional_1.10-41.1_i386.deb ...
Unpacking netcat-traditional (1.10-41.1) ...
Selecting previously unselected package dns-root-data.
Preparing to unpack .../01-dns-root-data_2019031302_all.deb ...
Unpacking dns-root-data (2019031302) ...
Selecting previously unselected package idn2.
Preparing to unpack .../02-idn2_2.0.5-1+deb10u1_i386.deb ...
Unpacking idn2 (2.0.5-1+deb10u1) ...
Selecting previously unselected package libfam0:i386.
Preparing to unpack .../03-libfam0_2.7.0-17.3_i386.deb ...
Unpacking libfam0:i386 (2.7.0-17.3) ...
Preparing to unpack .../04-libsqlite3-0_3.27.2-3+deb10u1_i386.deb ...
Unpacking libsqlite3-0:i386 (3.27.2-3+deb10u1) over (3.27.2-3) ...
Selecting previously unselected package lighttpd.
Preparing to unpack .../05-lighttpd_1.4.53-4+deb10u1_i386.deb ...
Unpacking lighttpd (1.4.53-4+deb10u1) ...
Selecting previously unselected package netcat.
Preparing to unpack .../06-netcat_1.10-41.1_all.deb ...
Unpacking netcat (1.10-41.1) ...
Preparing to unpack .../06-netcat_1.10-41.1_all.deb ...
Unpacking netcat (1.10-41.1) ...
Selecting previously unselected package php-common.
Preparing to unpack .../07-php-common_2%3a69_all.deb ...
Unpacking php-common (2:69) ...
Selecting previously unselected package php7.3-common.
Selecting previously unselected package php7.3-common.
Preparing to unpack .../08-php7.3-common_7.3.19-1~deb10u1_i386.deb ...
Unpacking php7.3-common (7.3.19-1~deb10u1) ...
Selecting previously unselected package sqlite3.l.deb ...86.deb ... ....
Preparing to unpack .../22-sqlite3_3.27.2-3+deb10u1_i386.deb ...
Unpacking sqlite3 (3.27.2-3+deb10u1) ...
Setting up idn2 (2.0.5-1+deb10u1) ...
Setting up php-common (2:69) ...
Created symlink /etc/systemd/system/timers.target.wants/phpsessionclean.timer โ†’ /lib/systemd/system/phpsessionclean.timer.
Setting up netcat-traditional (1.10-41.1) ...
update-alternatives: using /bin/nc.traditional to provide /bin/nc (nc) in auto mode
Setting up libsqlite3-0:i386 (3.27.2-3+deb10u1) ...
Setting up netcat (1.10-41.1) ...
Setting up dns-root-data (2019031302) ...
Setting up php7.3-common (7.3.19-1~deb10u1) ...

Creating config file /etc/php/7.3/mods-available/calendar.ini with new version

Creating config file /etc/php/7.3/mods-available/ctype.ini with new version

Creating config file /etc/php/7.3/mods-available/exif.ini with new version

Creating config file /etc/php/7.3/mods-available/fileinfo.ini with new version

Creating config file /etc/php/7.3/mods-available/ftp.ini with new version

Creating config file /etc/php/7.3/mods-available/gettext.ini with new version

Creating config file /etc/php/7.3/mods-available/iconv.ini with new version

Creating config file /etc/php/7.3/mods-available/pdo.ini with new version

Creating config file /etc/php/7.3/mods-available/phar.ini with new version

Creating config file /etc/php/7.3/mods-available/posix.ini with new version

Creating config file /etc/php/7.3/mods-available/shmop.ini with new version

Creating config file /etc/php/7.3/mods-available/sockets.ini with new version

Creating config file /etc/php/7.3/mods-available/sysvmsg.ini with new version

Creating config file /etc/php/7.3/mods-available/sysvsem.ini with new version

Creating config file /etc/php/7.3/mods-available/sysvshm.ini with new version

Creating config file /etc/php/7.3/mods-available/tokenizer.ini with new version
Setting up php7.3-intl (7.3.19-1~deb10u1) ...

Creating config file /etc/php/7.3/mods-available/intl.ini with new version
Setting up php7.3-xml (7.3.19-1~deb10u1) ...

Creating config file /etc/php/7.3/mods-available/dom.ini with new version

Creating config file /etc/php/7.3/mods-available/simplexml.ini with new version

Creating config file /etc/php/7.3/mods-available/wddx.ini with new version

Creating config file /etc/php/7.3/mods-available/xml.ini with new version

Creating config file /etc/php/7.3/mods-available/xmlreader.ini with new version

Creating config file /etc/php/7.3/mods-available/xmlwriter.ini with new version

Creating config file /etc/php/7.3/mods-available/xsl.ini with new version
Setting up libfam0:i386 (2.7.0-17.3) ...
Setting up php7.3-opcache (7.3.19-1~deb10u1) ...

Creating config file /etc/php/7.3/mods-available/opcache.ini with new version
Setting up sqlite3 (3.27.2-3+deb10u1) ...
Setting up lighttpd (1.4.53-4+deb10u1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/lighttpd.service โ†’ /lib/systemd/system/lighttpd.service.
Setting up php-xml (2:7.3+69) ...
Setting up php7.3-sqlite3 (7.3.19-1~deb10u1) ...

Creating config file /etc/php/7.3/mods-available/sqlite3.ini with new version

Creating config file /etc/php/7.3/mods-available/pdo_sqlite.ini with new version
Setting up php7.3-json (7.3.19-1~deb10u1) ...

Creating config file /etc/php/7.3/mods-available/json.ini with new version
Setting up php-json (2:7.3+69) ...
Setting up php7.3-readline (7.3.19-1~deb10u1) ...

Creating config file /etc/php/7.3/mods-available/readline.ini with new version
Setting up php-sqlite3 (2:7.3+69) ...
Setting up php-intl (2:7.3+69) ...
Setting up php7.3-cli (7.3.19-1~deb10u1) ...
update-alternatives: using /usr/bin/php7.3 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.3 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.3 to provide /usr/bin/phar.phar (phar.phar) in auto mode

Creating config file /etc/php/7.3/cli/php.ini with new version
Setting up php7.3-cgi (7.3.19-1~deb10u1) ...
update-alternatives: using /usr/bin/php-cgi7.3 to provide /usr/bin/php-cgi (php-cgi) in auto mode
update-alternatives: using /usr/lib/cgi-bin/php7.3 to provide /usr/lib/cgi-bin/php (php-cgi-bin) in auto mode

Creating config file /etc/php/7.3/cgi/php.ini with new version
Setting up php-cgi (2:7.3+69) ...
Processing triggers for systemd (241-7~deb10u3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
+ tr ' ' -
+ printf '%*s\n' 120 ''
------------------------------------------------------------------------------------------------------------------------
+ return
+ unset dep_install_list
+ [[ true == true ]]
+ enable_service lighttpd
+ local 'str=Enabling lighttpd service to start on reboot'
+ printf '  %b %s...' '[i]' 'Enabling lighttpd service to start on reboot'
  [i] Enabling lighttpd service to start on reboot...+ is_command systemctl
+ local check_command=systemctl
+ command -v systemctl
+ systemctl enable lighttpd
+ printf '%b  %b %s...\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Enabling lighttpd service to start on reboot'
  [โœ“] Enabling lighttpd service to start on reboot...
+ check_service_active lighttpd
+ is_command systemctl
+ local check_command=systemctl
+ command -v systemctl
+ systemctl is-enabled lighttpd
+ LIGHTTPD_ENABLED=true
+ create_pihole_user
+ local 'str=Checking for user '\''pihole'\'''
+ printf '  %b %s...' '[i]' 'Checking for user '\''pihole'\'''
  [i] Checking for user 'pihole'...+ id -u pihole
+ printf '%b  %b %s' '\r\033[K' '[\e[1;31mโœ—\e[0m]' 'Checking for user '\''pihole'\'''
  [โœ—] Checking for user 'pihole'+ local 'str=Creating user '\''pihole'\'''
+ printf '%b  %b %s...' '\r\033[K' '[i]' 'Creating user '\''pihole'\'''
  [i] Creating user 'pihole'...+ getent group pihole
+ useradd -r -s /usr/sbin/nologin pihole
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Creating user '\''pihole'\'''
  [โœ“] Creating user 'pihole'
+ local funcOutput
++ get_binary_name
++ local machine
+++ uname -m
++ machine=x86_64
++ local l_binary
++ local 'str=Detecting processor'
++ printf '  %b %s...' '[i]' 'Detecting processor'
++ [[ x86_64 == \a\r\m* ]]
++ [[ x86_64 == *\a\a\r\c\h* ]]
++ [[ x86_64 == \x\8\6\_\6\4 ]]
++ local dpkgarch
+++ dpkg --print-processor
+++ true
++ dpkgarch=
++ [[ '' == \i\3\8\6 ]]
++ printf '%b  %b Detected x86_64 processor\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]'
++ l_binary=pihole-FTL-linux-x86_64
++ echo pihole-FTL-linux-x86_64
  [โœ“] Detected x86_64 processor
pihole-FTL-linux-x86_64'
+ local binary
+ binary=pihole-FTL-linux-x86_64
+ local theRest
  [โœ“] Detected x86_64 processor
'
  [โœ“] Detected x86_64 processor
'
+ printf '\n  %b FTL Checks...\n\n' '[i]'

  [i] FTL Checks...

  [โœ“] Detected x86_64 processor
'
  [โœ“] Detected x86_64 processor
+ FTLcheckUpdate pihole-FTL-linux-x86_64
+ printf '  %b Checking for existing FTL binary...\n' '[i]'
  [i] Checking for existing FTL binary...
+ local ftlLoc
++ which pihole-FTL
+ ftlLoc=
+ local ftlBranch
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=master
+ local binary
+ binary=pihole-FTL-linux-x86_64
+ local remoteSha1
+ local localSha1
+ which dnsmasq
+ [[ ! master == \m\a\s\t\e\r ]]
+ [[ -n '' ]]
+ return 0
+ FTLinstall pihole-FTL-linux-x86_64
+ local latesttag
+ local 'str=Downloading and Installing FTL'
+ printf '  %b %s...' '[i]' 'Downloading and Installing FTL'
  [i] Downloading and Installing FTL...++ mktemp -d
+ pushd /tmp/tmp.LHPhDKiKRg
+ install -T -m 0755 /etc/.pihole/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL
+ local ftlBranch
+ local url
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=master
+ local binary
+ binary=pihole-FTL-linux-x86_64
+ [[ master == \m\a\s\t\e\r ]]
+ url=https://github.com/pi-hole/ftl/releases/latest/download
+ curl -sSL --fail https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL-linux-x86_64 -o pihole-FTL-linux-x86_64
+ curl -sSL --fail https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL-linux-x86_64.sha1 -o pihole-FTL-linux-x86_64.sha1
+ sha1sum --status --quiet -c pihole-FTL-linux-x86_64.sha1
+ printf 'transferred... '
transferred... + curl -sSL https://ftl.pi-hole.net/macvendor.db -o /etc/pihole/macvendor.db
+ chmod 644 /etc/pihole/macvendor.db
+ chown pihole:pihole /etc/pihole/macvendor.db
+ stop_service pihole-FTL
+ install -T -m 0755 pihole-FTL-linux-x86_64 /usr/bin/pihole-FTL
+ popd
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Downloading and Installing FTL'
  [โœ“] Downloading and Installing FTL
+ return 0
+ tee -a /proc/1240/fd/3
+ installPihole
+ [[ true == true ]]
+ [[ ! -d /var/www/html ]]
+ [[ true == true ]]
+ chown www-data:www-data /var/www/html
+ chmod 0775 /var/www/html
+ chmod a+rx /var/www
+ chmod a+rx /var/www/html
+ usermod -a -G pihole www-data
+ is_command lighty-enable-mod
+ local check_command=lighty-enable-mod
+ command -v lighty-enable-mod
+ lighty-enable-mod fastcgi fastcgi-php
+ true
+ [[ false == true ]]
+ installScripts
+ local 'str=Installing scripts from /etc/.pihole'
+ printf '  %b %s...' '[i]' 'Installing scripts from /etc/.pihole'
+ clean_existing /opt/pihole chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage
+ local clean_directory=/opt/pihole
+ shift
+ old_files=("$@")
+ local old_files
+ for script in "${old_files[@]}"
+ rm -f /opt/pihole/chronometer.sh
  [i] Installing scripts from /etc/.pihole...+ for script in "${old_files[@]}"
+ rm -f /opt/pihole/list.sh
+ for script in "${old_files[@]}"
+ rm -f /opt/pihole/piholeDebug.sh
+ for script in "${old_files[@]}"
+ rm -f /opt/pihole/piholeLogFlush.sh
+ for script in "${old_files[@]}"
+ rm -f /opt/pihole/setupLCD.sh
+ for script in "${old_files[@]}"
+ rm -f /opt/pihole/update.sh
+ for script in "${old_files[@]}"
+ rm -f /opt/pihole/version.sh
+ for script in "${old_files[@]}"
+ rm -f /opt/pihole/gravity.sh
+ for script in "${old_files[@]}"
+ rm -f /opt/pihole/uninstall.sh
+ for script in "${old_files[@]}"
+ rm -f /opt/pihole/webpage.sh
+ is_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local rc
+ [[ -d /etc/.pihole ]]
+ pushd /etc/.pihole
+ git status --short
+ popd
+ return 0
+ cd /etc/.pihole
+ install -o root -Dm755 -d /opt/pihole
+ install -o root -Dm755 -t /opt/pihole gravity.sh
+ install -o root -Dm755 -t /opt/pihole ./advanced/Scripts/chronometer.sh ./advanced/Scripts/list.sh ./advanced/Scripts/piholeARPTable.sh ./advanced/Scripts/piholeCheckout.sh ./advanced/Scripts/piholeDebug.sh ./advanced/Scripts/piholeLogFlush.sh ./advanced/Scripts/pihole-reenable.sh ./advanced/Scripts/query.sh ./advanced/Scripts/setupLCD.sh ./advanced/Scripts/updatecheck.sh ./advanced/Scripts/update.sh ./advanced/Scripts/version.sh ./advanced/Scripts/webpage.sh ./advanced/Scripts/wildcard_regex_converter.sh
+ install -o root -Dm755 -t /opt/pihole './automated install/uninstall.sh'
+ install -o root -Dm755 -t /opt/pihole ./advanced/Scripts/COL_TABLE
+ install -o root -Dm755 -t /usr/local/bin pihole
+ install -Dm644 ./advanced/bash-completion/pihole /etc/bash_completion.d/pihole
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Installing scripts from /etc/.pihole'
+ installConfigs
+ printf '\n  %b Installing configs from %s...\n' '[i]' /etc/.pihole
+ version_check_dnsmasq
+ local dnsmasq_conf=/etc/dnsmasq.conf
+ local dnsmasq_conf_orig=/etc/dnsmasq.conf.orig
+ local dnsmasq_pihole_id_string=addn-hosts=/etc/pihole/gravity.list
+ local 'dnsmasq_pihole_id_string2=# Dnsmasq config for Pi-hole'\''s FTLDNS'
+ local dnsmasq_original_config=/etc/.pihole/advanced/dnsmasq.conf.original
+ local dnsmasq_pihole_01_snippet=/etc/.pihole/advanced/01-pihole.conf
+ local dnsmasq_pihole_01_location=/etc/dnsmasq.d/01-pihole.conf
+ [[ -f /etc/dnsmasq.conf ]]
+ printf '  %b No dnsmasq.conf found... restoring default dnsmasq.conf...' '[i]'
+ install -D -m 644 -T /etc/.pihole/advanced/dnsmasq.conf.original /etc/dnsmasq.conf
  [โœ“] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...
  [i] No dnsmasq.conf found... restoring default dnsmasq.conf...+ printf '%b  %b No dnsmasq.conf found... restoring default dnsmasq.conf...\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]'
+ printf '  %b Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf...' '[i]'
+ [[ ! -d /etc/dnsmasq.d ]]
+ install -d -m 755 /etc/dnsmasq.d
  [โœ“] No dnsmasq.conf found... restoring default dnsmasq.conf...
  [i] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf...+ install -D -m 644 -T /etc/.pihole/advanced/01-pihole.conf /etc/dnsmasq.d/01-pihole.conf
+ printf '%b  %b Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]'
+ sed -i s/@INT@/eth0/ /etc/dnsmasq.d/01-pihole.conf
  [โœ“] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
+ [[ 1.1.1.1 != '' ]]
+ sed -i s/@DNS1@/1.1.1.1/ /etc/dnsmasq.d/01-pihole.conf
+ [[ 1.0.0.1 != '' ]]
+ sed -i s/@DNS2@/1.0.0.1/ /etc/dnsmasq.d/01-pihole.conf
+ sed -i s/@CACHE_SIZE@/10000/ /etc/dnsmasq.d/01-pihole.conf
+ sed -i 's/^#conf-dir=\/etc\/dnsmasq.d$/conf-dir=\/etc\/dnsmasq.d/' /etc/dnsmasq.conf
+ [[ true == false ]]
+ sed -i 's/^#log-queries/log-queries/' /etc/dnsmasq.d/01-pihole.conf
+ echo 'Google (ECS);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
OpenDNS (ECS, DNSSEC);208.67.222.222;208.67.220.220;2620:119:35::35;2620:119:53::53
Level3;4.2.2.1;4.2.2.2;;
Comodo;8.26.56.26;8.20.247.20;;
DNS.WATCH;84.200.69.80;84.200.70.40;2001:1608:10:25:0:0:1c04:b12f;2001:1608:10:25:0:0:9249:d69b
Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9
Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10
Quad9 (filtered + ECS);9.9.9.11;149.112.112.11;2620:fe::11;2620:fe::fe:11
Cloudflare;1.1.1.1;1.0.0.1;2606:4700:4700::1111;2606:4700:4700::1001'
+ chmod 644 /etc/pihole/dns-servers.conf
+ [[ ! -r /etc/pihole/pihole-FTL.conf ]]
+ install -d -m 0755 /etc/pihole
+ install -o pihole -m 664 /dev/null /etc/pihole/pihole-FTL.conf
+ [[ ! -r /etc/pihole/custom.list ]]
+ install -o root -m 644 /dev/null /etc/pihole/custom.list
+ [[ true == true ]]
+ [[ ! -d /etc/lighttpd ]]
+ [[ -f /etc/lighttpd/lighttpd.conf ]]
+ mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
+ install -D -m 644 -T /etc/.pihole/advanced/lighttpd.conf.debian /etc/lighttpd/lighttpd.conf
+ touch /etc/lighttpd/external.conf
+ chmod 644 /etc/lighttpd/external.conf
+ [[ -f /var/www/html/pihole/custom.php ]]
+ mkdir -p /run/lighttpd
+ chown www-data:www-data /run/lighttpd
+ mkdir -p /var/cache/lighttpd/compress
+ chown www-data:www-data /var/cache/lighttpd/compress
+ mkdir -p /var/cache/lighttpd/uploads
+ chown www-data:www-data /var/cache/lighttpd/uploads
+ [[ true == true ]]
+ installPiholeWeb
+ printf '\n  %b Installing blocking page...\n' '[i]'
+ local 'str=Creating directory for blocking page, and copying files'
+ printf '  %b %s...' '[i]' 'Creating directory for blocking page, and copying files'
+ install -d -m 0755 /var/www/html/pihole

  [i] Installing blocking page...
  [i] Creating directory for blocking page, and copying files...+ install -D -m 644 /etc/.pihole/advanced/index.php /etc/.pihole/advanced/blockingpage.css /var/www/html/pihole/
+ [[ -e /var/www/html/pihole/index.js ]]
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Creating directory for blocking page, and copying files'
+ local 'str=Backing up index.lighttpd.html'
+ printf '  %b %s...' '[i]' 'Backing up index.lighttpd.html'
+ [[ -f /var/www/html/index.lighttpd.html ]]
+ printf '%b  %b %s\n' '\r\033[K' '[i]' 'Backing up index.lighttpd.html'
+ printf '      No default index.lighttpd.html file found... not backing up\n'
+ local 'str=Installing sudoer file'
+ printf '\n  %b %s...' '[i]' 'Installing sudoer file'
+ install -d -m 755 /etc/sudoers.d/
  [โœ“] Creating directory for blocking page, and copying files
  [i] Backing up index.lighttpd.html
      No default index.lighttpd.html file found... not backing up

  [i] Installing sudoer file...+ install -m 0640 /etc/.pihole/advanced/Templates/pihole.sudo /etc/sudoers.d/pihole
+ echo 'www-data ALL=NOPASSWD: /usr/local/bin/pihole'
+ [[ www-data == \l\i\g\h\t\t\p\d ]]
+ chmod 0440 /etc/sudoers.d/pihole
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Installing sudoer file'
+ installCron
+ local 'str=Installing latest Cron script'
+ printf '\n  %b %s...' '[i]' 'Installing latest Cron script'
+ install -D -m 644 -T -o root -g root /etc/.pihole/advanced/Templates/pihole.cron /etc/cron.d/pihole
  [โœ“] Installing sudoer file

  [i] Installing latest Cron script...+ sed -i 's/59 1 /36 4/' /etc/cron.d/pihole
+ sed -i 's/59 17/28 17/' /etc/cron.d/pihole
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Installing latest Cron script'
+ installLogrotate
+ local 'str=Installing latest logrotate script'
+ printf '\n  %b %s...' '[i]' 'Installing latest logrotate script'
+ install -D -m 644 -T /etc/.pihole/advanced/Templates/logrotate /etc/pihole/logrotate
  [โœ“] Installing latest Cron script

  [i] Installing latest logrotate script...++ stat -c '%U %G' /var/log
+ logusergroup='root root'
+ [[ ! -z root root ]]
+ sed -i 's/# su #/su root root/g;' /etc/pihole/logrotate
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]' 'Installing latest logrotate script'
+ disable_dnsmasq
+ which dnsmasq
  [โœ“] Installing latest logrotate script
+ local conffile=/etc/dnsmasq.conf
+ [[ -f /etc/dnsmasq.conf ]]
+ printf '  %b Backing up %s to %s.old\n' '[i]' /etc/dnsmasq.conf /etc/dnsmasq.conf
+ mv /etc/dnsmasq.conf /etc/dnsmasq.conf.old
  [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old
+ echo conf-dir=/etc/dnsmasq.d
+ chmod 644 /etc/dnsmasq.conf
+ install_manpage
+ printf '  %b Testing man page installation' '[i]'
+ is_command mandb
+ local check_command=mandb
+ command -v mandb
+ [[ ! -d /usr/local/share/man ]]
+ [[ ! -d /usr/local/share/man/man8 ]]
+ install -d -m 755 /usr/local/share/man/man8
  [i] Testing man page installation+ [[ ! -d /usr/local/share/man/man5 ]]
+ install -d -m 755 /usr/local/share/man/man5
+ install -D -m 644 -T /etc/.pihole/manpages/pihole.8 /usr/local/share/man/man8/pihole.8
+ install -D -m 644 -T /etc/.pihole/manpages/pihole-FTL.8 /usr/local/share/man/man8/pihole-FTL.8
+ install -D -m 644 -T /etc/.pihole/manpages/pihole-FTL.conf.5 /usr/local/share/man/man5/pihole-FTL.conf.5
+ mandb -q
+ printf '%b  %b man pages installed and database updated\n' '\r\033[K' '[\e[1;32mโœ“\e[0m]'
+ return
+ finalExports
+ [[ true == false ]]
+ [[ -e /etc/pihole/setupVars.conf ]]
+ echo PIHOLE_INTERFACE=eth0
+ echo IPV4_ADDRESS=10.0.1.251/8
+ echo IPV6_ADDRESS=
+ echo PIHOLE_DNS_1=1.1.1.1
+ echo PIHOLE_DNS_2=1.0.0.1
+ echo QUERY_LOGGING=true
+ echo INSTALL_WEB_SERVER=true
+ echo INSTALL_WEB_INTERFACE=true
+ echo LIGHTTPD_ENABLED=true
+ echo CACHE_SIZE=10000
+ chmod 644 /etc/pihole/setupVars.conf
  [โœ“] man pages installed and database updated
+ sed -i /PRIVACYLEVEL/d /etc/pihole/pihole-FTL.conf
+ echo PRIVACYLEVEL=0
+ source /etc/pihole/setupVars.conf
++ PIHOLE_INTERFACE=eth0
++ IPV4_ADDRESS=10.0.1.251/8
++ IPV6_ADDRESS=
++ PIHOLE_DNS_1=1.1.1.1
++ PIHOLE_DNS_2=1.0.0.1
++ QUERY_LOGGING=true
++ INSTALL_WEB_SERVER=true
++ INSTALL_WEB_INTERFACE=true
++ LIGHTTPD_ENABLED=true
++ CACHE_SIZE=10000
+ source /etc/.pihole/advanced/Scripts/webpage.sh
++ readonly dnsmasqconfig=/etc/dnsmasq.d/01-pihole.conf
++ dnsmasqconfig=/etc/dnsmasq.d/01-pihole.conf
++ readonly dhcpconfig=/etc/dnsmasq.d/02-pihole-dhcp.conf
++ dhcpconfig=/etc/dnsmasq.d/02-pihole-dhcp.conf
++ readonly FTLconf=/etc/pihole/pihole-FTL.conf
++ FTLconf=/etc/pihole/pihole-FTL.conf
++ readonly dhcpstaticconfig=/etc/dnsmasq.d/04-pihole-static-dhcp.conf
++ dhcpstaticconfig=/etc/dnsmasq.d/04-pihole-static-dhcp.conf
++ readonly dnscustomfile=/etc/pihole/custom.list
++ dnscustomfile=/etc/pihole/custom.list
++ readonly dnscustomcnamefile=/etc/dnsmasq.d/05-pihole-custom-cname.conf
++ dnscustomcnamefile=/etc/dnsmasq.d/05-pihole-custom-cname.conf
++ readonly gravityDBfile=/etc/pihole/gravity.db
++ gravityDBfile=/etc/pihole/gravity.db
++ readonly PI_HOLE_FILES_DIR=/etc/.pihole
++ PI_HOLE_FILES_DIR=/etc/.pihole
++ PH_TEST=true
++ source '/etc/.pihole/automated install/basic-install.sh'
+++ set -e
+++ export PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++++ cat
+++ DNS_SERVERS='Google (ECS);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
OpenDNS (ECS, DNSSEC);208.67.222.222;208.67.220.220;2620:119:35::35;2620:119:53::53
Level3;4.2.2.1;4.2.2.2;;
Comodo;8.26.56.26;8.20.247.20;;
DNS.WATCH;84.200.69.80;84.200.70.40;2001:1608:10:25:0:0:1c04:b12f;2001:1608:10:25:0:0:9249:d69b
Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9
Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10
Quad9 (filtered + ECS);9.9.9.11;149.112.112.11;2620:fe::11;2620:fe::fe:11
Cloudflare;1.1.1.1;1.0.0.1;2606:4700:4700::1111;2606:4700:4700::1001'
+++ installLogLoc=/etc/pihole/install.log
+++ setupVars=/etc/pihole/setupVars.conf
+++ lighttpdConfig=/etc/lighttpd/lighttpd.conf
+++ coltable=/opt/pihole/COL_TABLE
+++ webroot=/var/www/html
+++ webInterfaceGitUrl=https://github.com/pi-hole/AdminLTE.git
+++ webInterfaceDir=/var/www/html/admin
+++ piholeGitUrl=https://github.com/pi-hole/pi-hole.git
+++ PI_HOLE_LOCAL_REPO=/etc/.pihole
+++ PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)
+++ PI_HOLE_INSTALL_DIR=/opt/pihole
+++ PI_HOLE_CONFIG_DIR=/etc/pihole
+++ PI_HOLE_BIN_DIR=/usr/local/bin
+++ PI_HOLE_BLOCKPAGE_DIR=/var/www/html/pihole
+++ '[' -z false ']'
+++ adlistFile=/etc/pihole/adlists.list
+++ IPV4_ADDRESS=10.0.1.251/8
+++ IPV6_ADDRESS=
+++ QUERY_LOGGING=true
+++ INSTALL_WEB_INTERFACE=true
+++ PRIVACY_LEVEL=0
+++ CACHE_SIZE=10000
+++ '[' -z root ']'
+++ '[' -t 0 ']'
++++ stty size
+++ screen_size='50 153'
+++ printf -v rows %d 50
+++ printf -v columns %d 153
+++ r=25
+++ c=76
+++ r=25
+++ c=76
+++ reconfigure=false
+++ runUnattended=false
+++ INSTALL_WEB_SERVER=true
+++ [[ -f /opt/pihole/COL_TABLE ]]
+++ source /opt/pihole/COL_TABLE
++++ [[ -t 1 ]]
++++ COL_BOLD=
++++ COL_ULINE=
++++ COL_NC=
++++ COL_GRAY=
++++ COL_RED=
++++ COL_GREEN=
++++ COL_YELLOW=
++++ COL_BLUE=
++++ COL_PURPLE=
++++ COL_CYAN=
++++ COL_WHITE=
++++ COL_BLACK=
++++ COL_LIGHT_BLUE=
++++ COL_LIGHT_GREEN=
++++ COL_LIGHT_CYAN=
++++ COL_LIGHT_RED=
++++ COL_URG_RED=
++++ COL_LIGHT_PURPLE=
++++ COL_BROWN=
++++ COL_LIGHT_GRAY=
++++ COL_DARK_GRAY=
++++ TICK='[โœ“]'
++++ CROSS='[โœ—]'
++++ INFO='[i]'
++++ QST='[?]'
++++ DONE=' done!'
++++ OVER='\r'
+++ counter=0
+++ [[ true != true ]]
++ coltable=/opt/pihole/COL_TABLE
++ [[ -f /opt/pihole/COL_TABLE ]]
++ source /opt/pihole/COL_TABLE
+++ [[ -t 1 ]]
+++ COL_BOLD=
+++ COL_ULINE=
+++ COL_NC=
+++ COL_GRAY=
+++ COL_RED=
+++ COL_GREEN=
+++ COL_YELLOW=
+++ COL_BLUE=
+++ COL_PURPLE=
+++ COL_CYAN=
+++ COL_WHITE=
+++ COL_BLACK=
+++ COL_LIGHT_BLUE=
+++ COL_LIGHT_GREEN=
+++ COL_LIGHT_CYAN=
+++ COL_LIGHT_RED=
+++ COL_URG_RED=
+++ COL_LIGHT_PURPLE=
+++ COL_BROWN=
+++ COL_LIGHT_GRAY=
+++ COL_DARK_GRAY=
+++ TICK='[โœ“]'
+++ CROSS='[โœ—]'
+++ INFO='[i]'
+++ QST='[?]'
+++ DONE=' done!'
+++ OVER='\r'
+ ProcessDNSSettings
+ source /etc/pihole/setupVars.conf
++ PIHOLE_INTERFACE=eth0
++ IPV4_ADDRESS=10.0.1.251/8
++ IPV6_ADDRESS=
++ PIHOLE_DNS_1=1.1.1.1
++ PIHOLE_DNS_2=1.0.0.1
++ QUERY_LOGGING=true
++ INSTALL_WEB_SERVER=true
++ INSTALL_WEB_INTERFACE=true
++ LIGHTTPD_ENABLED=true
++ CACHE_SIZE=10000
+ delete_dnsmasq_setting server
+ sed -i /server/d /etc/dnsmasq.d/01-pihole.conf
+ COUNTER=1
+ true
+ var=PIHOLE_DNS_1
+ '[' -z 1.1.1.1 ']'
+ add_dnsmasq_setting server 1.1.1.1
+ [[ 1.1.1.1 != '' ]]
+ echo server=1.1.1.1
+ ((  COUNTER++  ))
+ true
+ var=PIHOLE_DNS_2
+ '[' -z 1.0.0.1 ']'
+ add_dnsmasq_setting server 1.0.0.1
+ [[ 1.0.0.1 != '' ]]
+ echo server=1.0.0.1
+ ((  COUNTER++  ))
+ true
+ var=PIHOLE_DNS_3
+ '[' -z '' ']'
+ break
+ '[' -n '' ']'
+ delete_dnsmasq_setting domain-needed
+ sed -i /domain-needed/d /etc/dnsmasq.d/01-pihole.conf
+ delete_dnsmasq_setting expand-hosts
+ sed -i /expand-hosts/d /etc/dnsmasq.d/01-pihole.conf
+ [[ '' == true ]]
+ delete_dnsmasq_setting bogus-priv
+ sed -i /bogus-priv/d /etc/dnsmasq.d/01-pihole.conf
+ [[ '' == true ]]
+ delete_dnsmasq_setting dnssec
+ sed -i /dnssec/d /etc/dnsmasq.d/01-pihole.conf
+ delete_dnsmasq_setting trust-anchor=
+ sed -i /trust-anchor=/d /etc/dnsmasq.d/01-pihole.conf
+ [[ '' == true ]]
+ delete_dnsmasq_setting host-record
+ sed -i /host-record/d /etc/dnsmasq.d/01-pihole.conf
+ '[' -n '' ']'
+ delete_dnsmasq_setting interface
+ sed -i /interface/d /etc/dnsmasq.d/01-pihole.conf
+ delete_dnsmasq_setting local-service
+ sed -i /local-service/d /etc/dnsmasq.d/01-pihole.conf
+ [[ '' == \a\l\l ]]
+ [[ '' == \l\o\c\a\l ]]
+ '[' -z eth0 ']'
+ add_dnsmasq_setting interface eth0
+ [[ eth0 != '' ]]
+ echo interface=eth0
+ [[ '' == true ]]
+ [[ '' == true ]]
+ add_dnsmasq_setting server=/use-application-dns.net/
+ [[ '' != '' ]]
+ echo server=/use-application-dns.net/
+ ProcessDHCPSettings
+ source /etc/pihole/setupVars.conf
++ PIHOLE_INTERFACE=eth0
++ IPV4_ADDRESS=10.0.1.251/8
++ IPV6_ADDRESS=
++ PIHOLE_DNS_1=1.1.1.1
++ PIHOLE_DNS_2=1.0.0.1
++ QUERY_LOGGING=true
++ INSTALL_WEB_SERVER=true
++ INSTALL_WEB_INTERFACE=true
++ LIGHTTPD_ENABLED=true
++ CACHE_SIZE=10000
+ [[ '' == \t\r\u\e ]]
+ [[ -f /etc/dnsmasq.d/02-pihole-dhcp.conf ]]
+ ProcessDHCPSettings
+ source /etc/pihole/setupVars.conf
++ PIHOLE_INTERFACE=eth0
++ IPV4_ADDRESS=10.0.1.251/8
++ IPV6_ADDRESS=
++ PIHOLE_DNS_1=1.1.1.1
++ PIHOLE_DNS_2=1.0.0.1
++ QUERY_LOGGING=true
++ INSTALL_WEB_SERVER=true
++ INSTALL_WEB_INTERFACE=true
++ LIGHTTPD_ENABLED=true
++ CACHE_SIZE=10000
+ [[ '' == \t\r\u\e ]]
+ [[ -f /etc/dnsmasq.d/02-pihole-dhcp.conf ]]
+ copy_to_install_log
+ sed 's/[[0-9;]\{1,5\}m//g'
+ chmod 644 /etc/pihole/install.log
+ [[ true == true ]]
+ pw=
++ grep WEBPASSWORD -c /etc/pihole/setupVars.conf
+ [[ 0 == 0 ]]
++ head -c 8
++ tr -dc _A-Z-a-z-0-9
+ pw=wjRKgf1M
+ . /opt/pihole/webpage.sh
++ readonly dnsmasqconfig=/etc/dnsmasq.d/01-pihole.conf
++ dnsmasqconfig=/etc/dnsmasq.d/01-pihole.conf
++ readonly dhcpconfig=/etc/dnsmasq.d/02-pihole-dhcp.conf
++ dhcpconfig=/etc/dnsmasq.d/02-pihole-dhcp.conf
++ readonly FTLconf=/etc/pihole/pihole-FTL.conf
++ FTLconf=/etc/pihole/pihole-FTL.conf
++ readonly dhcpstaticconfig=/etc/dnsmasq.d/04-pihole-static-dhcp.conf
++ dhcpstaticconfig=/etc/dnsmasq.d/04-pihole-static-dhcp.conf
++ readonly dnscustomfile=/etc/pihole/custom.list
++ dnscustomfile=/etc/pihole/custom.list
++ readonly dnscustomcnamefile=/etc/dnsmasq.d/05-pihole-custom-cname.conf
++ dnscustomcnamefile=/etc/dnsmasq.d/05-pihole-custom-cname.conf
++ readonly gravityDBfile=/etc/pihole/gravity.db
++ gravityDBfile=/etc/pihole/gravity.db
++ readonly PI_HOLE_FILES_DIR=/etc/.pihole
++ PI_HOLE_FILES_DIR=/etc/.pihole
++ PH_TEST=true
++ source '/etc/.pihole/automated install/basic-install.sh'
+++ set -e
+++ export PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++++ cat
+++ DNS_SERVERS='Google (ECS);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
OpenDNS (ECS, DNSSEC);208.67.222.222;208.67.220.220;2620:119:35::35;2620:119:53::53
Level3;4.2.2.1;4.2.2.2;;
Comodo;8.26.56.26;8.20.247.20;;
DNS.WATCH;84.200.69.80;84.200.70.40;2001:1608:10:25:0:0:1c04:b12f;2001:1608:10:25:0:0:9249:d69b
Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9
Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10
Quad9 (filtered + ECS);9.9.9.11;149.112.112.11;2620:fe::11;2620:fe::fe:11
Cloudflare;1.1.1.1;1.0.0.1;2606:4700:4700::1111;2606:4700:4700::1001'
+++ installLogLoc=/etc/pihole/install.log
+++ setupVars=/etc/pihole/setupVars.conf
+++ lighttpdConfig=/etc/lighttpd/lighttpd.conf
+++ coltable=/opt/pihole/COL_TABLE
+++ webroot=/var/www/html
+++ webInterfaceGitUrl=https://github.com/pi-hole/AdminLTE.git
+++ webInterfaceDir=/var/www/html/admin
+++ piholeGitUrl=https://github.com/pi-hole/pi-hole.git
+++ PI_HOLE_LOCAL_REPO=/etc/.pihole
+++ PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)
+++ PI_HOLE_INSTALL_DIR=/opt/pihole
+++ PI_HOLE_CONFIG_DIR=/etc/pihole
+++ PI_HOLE_BIN_DIR=/usr/local/bin
+++ PI_HOLE_BLOCKPAGE_DIR=/var/www/html/pihole
+++ '[' -z false ']'
+++ adlistFile=/etc/pihole/adlists.list
+++ IPV4_ADDRESS=10.0.1.251/8
+++ IPV6_ADDRESS=
+++ QUERY_LOGGING=true
+++ INSTALL_WEB_INTERFACE=true
+++ PRIVACY_LEVEL=0
+++ CACHE_SIZE=10000
+++ '[' -z root ']'
+++ '[' -t 0 ']'
++++ stty size
+++ screen_size='50 153'
+++ printf -v rows %d 50
+++ printf -v columns %d 153
+++ r=25
+++ c=76
+++ r=25
+++ c=76
+++ reconfigure=false
+++ runUnattended=false
+++ INSTALL_WEB_SERVER=true
+++ [[ -f /opt/pihole/COL_TABLE ]]
+++ source /opt/pihole/COL_TABLE
++++ [[ -t 1 ]]
+++++ tput colors
++++ [[ 256 -ge 8 ]]
++++ COL_BOLD=''
++++ COL_ULINE=''
++++ COL_NC=''
++++ COL_GRAY=''
++++ COL_RED=''
++++ COL_GREEN=''
++++ COL_YELLOW=''
++++ COL_BLUE=''
++++ COL_PURPLE=''
++++ COL_CYAN=''
++++ COL_WHITE=''
++++ COL_BLACK=''
++++ COL_LIGHT_BLUE=''
++++ COL_LIGHT_GREEN=''
++++ COL_LIGHT_CYAN=''
++++ COL_LIGHT_RED=''
++++ COL_URG_RED=''
++++ COL_LIGHT_PURPLE=''
++++ COL_BROWN=''
++++ COL_LIGHT_GRAY=''
++++ COL_DARK_GRAY=''
++++ TICK='[โœ“]'
++++ CROSS='[โœ—]'
++++ INFO='[i]'
++++ QST='[?]'
++++ DONE=' done!'
++++ OVER='\r'
+++ counter=0
+++ [[ true != true ]]
++ coltable=/opt/pihole/COL_TABLE
++ [[ -f /opt/pihole/COL_TABLE ]]
++ source /opt/pihole/COL_TABLE
+++ [[ -t 1 ]]
++++ tput colors
+++ [[ 256 -ge 8 ]]
+++ COL_BOLD=''
+++ COL_ULINE=''
+++ COL_NC=''
+++ COL_GRAY=''
+++ COL_RED=''
+++ COL_GREEN=''
+++ COL_YELLOW=''
+++ COL_BLUE=''
+++ COL_PURPLE=''
+++ COL_CYAN=''
+++ COL_WHITE=''
+++ COL_BLACK=''
+++ COL_LIGHT_BLUE=''
+++ COL_LIGHT_GREEN=''
+++ COL_LIGHT_CYAN=''
+++ COL_LIGHT_RED=''
+++ COL_URG_RED=''
+++ COL_LIGHT_PURPLE=''
+++ COL_BROWN=''
+++ COL_LIGHT_GRAY=''
+++ COL_DARK_GRAY=''
+++ TICK='[โœ“]'
+++ CROSS='[โœ—]'
+++ INFO='[i]'
+++ QST='[?]'
+++ DONE=' done!'
+++ OVER='\r'
++ HashPassword wjRKgf1M
+++ sed 's/\s.*$//'
+++ sha256sum
+++ echo -n wjRKgf1M
++ return=4563388e958c284f79ebdc31b068e7f88de2737d86addf1cc73fa4eafa5ae2fe
+++ sed 's/\s.*$//'
+++ sha256sum
+++ echo -n 4563388e958c284f79ebdc31b068e7f88de2737d86addf1cc73fa4eafa5ae2fe
++ return=95916d2d1eb02f17682cd47bcec1b294d8280551b98867ae3d9848939518419d
++ echo 95916d2d1eb02f17682cd47bcec1b294d8280551b98867ae3d9848939518419d
+ echo WEBPASSWORD=95916d2d1eb02f17682cd47bcec1b294d8280551b98867ae3d9848939518419d
+ disable_resolved_stublistener
+ printf '  %b Testing if systemd-resolved is enabled\n' '[i]'
  [i] Testing if systemd-resolved is enabled
+ check_service_active systemd-resolved
+ is_command systemctl
+ local check_command=systemctl
+ command -v systemctl
+ systemctl is-enabled systemd-resolved
+ printf '%b  %b Systemd-resolved is not enabled\n' '\r' '[i]'
  [i] Systemd-resolved is not enabled
+ [[ true == true ]]
+ [[ true == true ]]
+ restart_service lighttpd
+ local 'str=Restarting lighttpd service'
+ printf '  %b %s...' '[i]' 'Restarting lighttpd service'
  [i] Restarting lighttpd service...+ is_command systemctl
+ local check_command=systemctl
+ command -v systemctl
+ systemctl restart lighttpd
+ printf '%b  %b %s...\n' '\r' '[โœ“]' 'Restarting lighttpd service'
  [โœ“] Restarting lighttpd service...
+ enable_service lighttpd
+ local 'str=Enabling lighttpd service to start on reboot'
+ printf '  %b %s...' '[i]' 'Enabling lighttpd service to start on reboot'
  [i] Enabling lighttpd service to start on reboot...+ is_command systemctl
+ local check_command=systemctl
+ command -v systemctl
+ systemctl enable lighttpd
+ printf '%b  %b %s...\n' '\r' '[โœ“]' 'Enabling lighttpd service to start on reboot'
  [โœ“] Enabling lighttpd service to start on reboot...
+ printf '  %b Restarting services...\n' '[i]'
  [i] Restarting services...
+ enable_service pihole-FTL
+ local 'str=Enabling pihole-FTL service to start on reboot'
+ printf '  %b %s...' '[i]' 'Enabling pihole-FTL service to start on reboot'
  [i] Enabling pihole-FTL service to start on reboot...+ is_command systemctl
+ local check_command=systemctl
+ command -v systemctl
+ systemctl enable pihole-FTL
+ printf '%b  %b %s...\n' '\r' '[โœ“]' 'Enabling pihole-FTL service to start on reboot'
  [โœ“] Enabling pihole-FTL service to start on reboot...
+ restart_service pihole-FTL
+ local 'str=Restarting pihole-FTL service'
+ printf '  %b %s...' '[i]' 'Restarting pihole-FTL service'
  [i] Restarting pihole-FTL service...+ is_command systemctl
+ local check_command=systemctl
+ command -v systemctl
+ systemctl restart pihole-FTL
+ printf '%b  %b %s...\n' '\r' '[โœ“]' 'Restarting pihole-FTL service'
  [โœ“] Restarting pihole-FTL service...
+ runGravity
+ /opt/pihole/gravity.sh --force
  [i] Creating new gravity database
  [i] Migrating content of /etc/pihole/adlists.list into new database
  [โœ“] Deleting existing list cache
  [i] Neutrino emissions detected...
  [โœ“] Pulling blocklist source list into range

  [โœ“] Preparing new gravity database
  [i] Using libz compression

  [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
  [โœ“] Status: Retrieval successful
  [i] Received 58660 domains

  [i] Target: https://mirror1.malwaredomains.com/files/justdomains
  [โœ“] Status: Retrieval successful
  [i] Received 26854 domains

  [โœ“] Storing downloaded domains in new gravity database
  [โœ“] Building tree
  [โœ“] Swapping databases
  [i] Number of gravity domains: 85514 (85484 unique domains)
  [i] Number of exact blacklisted domains: 0
  [i] Number of regex blacklist filters: 0
  [i] Number of exact whitelisted domains: 0
  [i] Number of regex whitelist filters: 0
  [โœ—]
  [โœ“] Cleaning up stray matter
  [โœ“] Restarting DNS server

  [โœ—] DNS service is NOT listening
+ /opt/pihole/updatecheck.sh
/opt/pihole/updatecheck.sh: line 77: /usr/bin/pihole-FTL: No such file or directory
/opt/pihole/updatecheck.sh: line 91: /usr/bin/pihole-FTL: No such file or directory
+ /opt/pihole/updatecheck.sh x remote
+ [[ false == false ]]
+ displayFinalMessage wjRKgf1M
+ [[ 8 -gt 0 ]]
+ pwstring=wjRKgf1M
+ [[ true == true ]]
+ additional='View the web interface at http://pi.hole/admin or http://10.0.1.251/admin

Your Admin Webpage login password is wjRKgf1M'
+ whiptail --msgbox --backtitle 'Make it so.' --title 'Installation Complete!' 'Configure your devices to use the Pi-hole as their DNS server using:

IPv4:   10.0.1.251
IPv6:   Not Configured

If you set a new IP address, you should restart the Pi.

The install log is in /etc/pihole.

View the web interface at http://pi.hole/admin or http://10.0.1.251/admin

Your Admin Webpage login password is wjRKgf1M' 25 76
+ [[ true == true ]]
+ ((  8 > 0  ))
+ printf '  %b Web Interface password: %b%s%b\n' '[i]' '' wjRKgf1M ''
  [i] Web Interface password: wjRKgf1M
+ printf '  %b This can be changed using '\''pihole -a -p'\''\n\n' '[i]'
  [i] This can be changed using 'pihole -a -p'

+ [[ false == false ]]
+ [[ true == true ]]
+ printf '  %b View the web interface at http://pi.hole/admin or http://%s/admin\n\n' '[i]' 10.0.1.251
  [i] View the web interface at http://pi.hole/admin or http://10.0.1.251/admin

+ printf '  %b You may now configure your devices to use the Pi-hole as their DNS server\n' '[i]'
  [i] You may now configure your devices to use the Pi-hole as their DNS server
+ [[ -n 10.0.1.251 ]]
+ printf '  %b Pi-hole DNS (IPv4): %s\n' '[i]' 10.0.1.251
  [i] Pi-hole DNS (IPv4): 10.0.1.251
+ [[ -n '' ]]
+ printf '  %b If you set a new IP address, please restart the server running the Pi-hole\n' '[i]'
  [i] If you set a new IP address, please restart the server running the Pi-hole
+ INSTALL_TYPE=Installation
+ printf '\n  %b The install log is located at: %s\n' '[i]' /etc/pihole/install.log

  [i] The install log is located at: /etc/pihole/install.log
+ printf '%b%s Complete! %b\n' '' Installation ''
Installation Complete!
+ [[ Installation == \U\p\d\a\t\e ]]

Thanks, that's exactly what I needed to see. dpkg --print-processor returned an empty string. An empty string does not match i386 so you get the default x86_64 version of the binary.

I don't know why it would return an empty string.

Edit: @DL6ER So no, my changes to =~ would do nothing in this case.

Can you run that command by itself, without sudo prepended?

Yes, but you're not going to like it:

pi@Pi-hole2:~ $ dpkg --print-architecture
i386