sudo bash -x /etc/.pihole/automated\ install/basic-install.sh
+ set -e
++ 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);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;
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
+ useUpdateVars=false
+ adlistFile=/etc/pihole/adlists.list
+ IPV4_ADDRESS=
+ IPV6_ADDRESS=
+ QUERY_LOGGING=true
+ INSTALL_WEB_INTERFACE=true
+ PRIVACY_LEVEL=0
+ '[' -z root ']'
+ '[' -t 0 ']'
++ stty size
+ screen_size='32 106'
+ printf -v rows %d 32
+ printf -v columns %d 106
+ r=16
+ c=53
+ r=20
+ c=70
+ skipSpaceCheck=false
+ 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 ]]
+ main
+ local 'str=Root user check'
+ printf '\n'
+ [[ 0 -eq 0 ]]
+ printf ' %b %s\n' '[✓]' 'Root user check'
[✓] Root user check
+ show_ascii_berry
+ echo -e '
.;;,.
.ccccc:,.
:cccclll:. ..,,
:ccccclll. ;ooodc
'\''ccll:;ll .oooodc
.;cll.;;looo:.
.. '\'','\''.
.'\'',,,,,,'\''.
.'\'',,,,,,,,,,.
.'\'',,,,,,,,,,,,....
....'\'''\'''\'',,,,,,,'\''.......
......... .... .........
.......... ..........
.......... ..........
......... .... .........
........,,,,,,,'\''......
....'\'',,,,,,,,,,,,.
.'\'',,,,,,,,,'\''.
.'\'',,,,,,'\''.
..'\'''\'''\''.
'
.;;,.
.ccccc:,.
:cccclll:. ..,,
:ccccclll. ;ooodc
'ccll:;ll .oooodc
.;cll.;;looo:.
.. ','.
.',,,,,,'.
.',,,,,,,,,,.
.',,,,,,,,,,,,....
....''',,,,,,,'.......
......... .... .........
.......... ..........
.......... ..........
......... .... .........
........,,,,,,,'......
....',,,,,,,,,,,,.
.',,,,,,,,,'.
.',,,,,,'.
..'''.
+ make_temporary_log
++ mktemp /tmp/pihole_temp.XXXXXX
+ TEMPLOG=/tmp/pihole_temp.tGAUEv
+ exec
+ rm /tmp/pihole_temp.tGAUEv
+ 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}" --yes --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
+ apt-get install --dry-run iproute2
+ iproute_pkg=iproute2
+ is_command php
+ local check_command=php
+ command -v php
++ php
+ printf ' %b Existing PHP installation detected : PHP version %s\n' '[i]' 7.0.33-0+deb9u7
[i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u7
++ php
+ printf -v phpInsMajor %d 7
++ php
+ printf -v phpInsMinor %d 0
+ '[' 7 -ge 7 ']'
+ phpInsNewer=true
+ [[ true != true ]]
+ phpVer=php7.0
+ apt-get install --dry-run php7.0-sqlite3
+ phpSqlite=sqlite3
+ INSTALLER_DEPS=(dhcpcd5 git "${iproute_pkg}" whiptail)
+ PIHOLE_DEPS=(cron curl dnsutils 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" "php-intl")
+ LIGHTTPD_USER=www-data
+ LIGHTTPD_GROUP=www-data
+ LIGHTTPD_CFG=lighttpd.conf.debian
+ [[ -f /etc/pihole/setupVars.conf ]]
+ [[ false == true ]]
+ update_dialogs
+ [[ false = true ]]
+ opt1a=Update
+ opt1b='This will retain existing settings.'
+ strAdd='You will be updated to the latest version.'
+ opt2a=Reconfigure
+ opt2b='This will reset your Pi-hole and allow you to enter new settings.'
++ whiptail --title 'Existing Install Detected!' --menu '\n\nWe have detected an existing install.\n\nPlease choose from the following options: \n(You will be updated to the latest version.)' 20 70 2 Update 'This will retain existing settings.' Reconfigure 'This will reset your Pi-hole and allow you to enter new settings.'
+ UpdateCmd=Update
+ case ${UpdateCmd} in
+ printf ' %b %s option selected\n' '[i]' Update
[i] Update option selected
+ useUpdateVars=true
+ [[ false == true ]]
+ verifyFreeDiskSpace
+ local 'str=Disk space check'
+ local required_free_kilobytes=51200
+ local existing_free_kilobytes
++ df -Pk
++ grep -m1 '\/$'
++ awk '{print $4}'
+ existing_free_kilobytes=92462784
+ [[ 92462784 =~ ^([0-9])+$ ]]
+ [[ 92462784 -lt 51200 ]]
+ printf ' %b %s\n' '[✓]' 'Disk space check'
[✓] Disk space check
+ 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' '[✓]' 'Update local cache of available packages'
[✓] Update local cache of available packages
+ 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'
+++ apt-get -s -o Debug::NoLocking=true upgrade
+++ grep -c '^Inst'
+++ true
+ updatesToInstall=0
++ uname -r
+ [[ -d /lib/modules/4.14.176-oxnas-tld-1 ]]
+ [[ 0 -eq 0 ]]
+ printf '%b %b %s... up to date!\n\n' '\r' '[✓]' 'Checking apt-get for upgraded packages'
[✓] Checking apt-get for upgraded packages... up to date!
+ install_dependent_packages dhcpcd5 git iproute2 whiptail
+ 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...+ dpkg-query -W '-f=${Status}' dhcpcd5
+ grep 'ok installed'
+ printf '%b %b Checking for %s\n' '\r' '[✓]' 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' '[✓]' 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' '[✓]' 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' '[✓]' whiptail
[✓] Checking for whiptail
+ [[ 0 -gt 0 ]]
+ printf '\n'
+ return 0
+ checkSelinux
+ local DEFAULT_SELINUX
+ local CURRENT_SELINUX
+ local SELINUX_ENFORCING=0
+ [[ -f /etc/selinux/config ]]
+ echo -e ' [i] SELinux not detected'
[i] SELinux not detected
+ [[ 0 -eq 1 ]]
+ [[ true == false ]]
+ installDefaultBlocklists
+ [[ -f /etc/pihole/adlists.list ]]
+ return
+ source /etc/pihole/setupVars.conf
++ WEBPASSWORD=redacted
++ DHCP_START=10.1.1.100
++ DHCP_END=10.1.1.149
++ DHCP_ROUTER=10.1.1.1
++ DHCP_LEASETIME=6
++ PIHOLE_DOMAIN=lan
++ DHCP_IPv6=false
++ DHCP_ACTIVE=false
++ ADMIN_EMAIL=
++ TEMPERATUREUNIT=F
++ WEBUIBOXEDLAYOUT=boxed
++ BLOCKING_ENABLED=true
++ DNSMASQ_LISTENING=single
++ DNS_FQDN_REQUIRED=true
++ DNS_BOGUS_PRIV=true
++ DNSSEC=false
++ CONDITIONAL_FORWARDING=true
++ CONDITIONAL_FORWARDING_IP=10.1.1.1
++ CONDITIONAL_FORWARDING_DOMAIN=lan
++ CONDITIONAL_FORWARDING_REVERSE=1.1.10.in-addr.arpa
++ PIHOLE_INTERFACE=eth0
++ IPV4_ADDRESS=10.1.1.197/24
++ 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
+ [[ -f /etc/pihole/pihole-FTL.conf ]]
++ sed -ne 's/PRIVACYLEVEL=\(.*\)/\1/p' /etc/pihole/pihole-FTL.conf
+ PRIVACY_LEVEL=0
+ 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 ]]
+ pushd /etc/.pihole
+ git status --short
+ popd
+ return 0
+ printf '%b %b %s\n' '\r' '[✓]' 'Check for existing repository in /etc/.pihole'
[✓] Check for existing repository in /etc/.pihole
+ update_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local curBranch
+ local 'str=Update repo in /etc/.pihole'
+ pushd /etc/.pihole
+ printf ' %b %s...' '[i]' 'Update repo in /etc/.pihole'
[i] Update repo in /etc/.pihole...+ git stash --all --quiet
+ git clean --quiet --force -d
+ git pull --quiet
++ git rev-parse --abbrev-ref HEAD
+ curBranch=master
+ [[ master == \m\a\s\t\e\r ]]
++ git describe --abbrev=0 --tags
+ git reset --hard v5.0
HEAD is now at 4d25f695 Merge pull request #3321 from pi-hole/release/v5.0
+ printf '%b %b %s\n' '\r' '[✓]' 'Update repo in /etc/.pihole'
[✓] Update repo in /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 ]]
+ pushd /var/www/html/admin
+ git status --short
+ popd
+ return 0
+ printf '%b %b %s\n' '\r' '[✓]' 'Check for existing repository in /var/www/html/admin'
[✓] Check for existing repository in /var/www/html/admin
+ update_repo /var/www/html/admin
+ local directory=/var/www/html/admin
+ local curBranch
+ local 'str=Update repo in /var/www/html/admin'
+ pushd /var/www/html/admin
+ printf ' %b %s...' '[i]' 'Update repo in /var/www/html/admin'
[i] Update repo in /var/www/html/admin...+ git stash --all --quiet
+ git clean --quiet --force -d
+ git pull --quiet
++ git rev-parse --abbrev-ref HEAD
+ curBranch=master
+ [[ master == \m\a\s\t\e\r ]]
++ git describe --abbrev=0 --tags
+ git reset --hard v5.0
HEAD is now at b86e4a31 Merge pull request #1247 from pi-hole/release/v5.0
+ printf '%b %b %s\n' '\r' '[✓]' 'Update repo in /var/www/html/admin'
[✓] Update repo in /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 dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data libcap2 lighttpd php7.0-common php7.0-cgi php7.0-sqlite3 php7.0-xml 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' '[✓]' cron
[✓] Checking for cron
+ for i in "$@"
+ printf ' %b Checking for %s...' '[i]' curl
[i] Checking for curl...+ dpkg-query -W '-f=${Status}' curl
+ grep 'ok installed'
+ printf '%b %b Checking for %s\n' '\r' '[✓]' curl
[✓] Checking for curl
+ for i in "$@"
+ printf ' %b Checking for %s...' '[i]' dnsutils
[i] Checking for dnsutils...+ dpkg-query -W '-f=${Status}' dnsutils
+ grep 'ok installed'
+ printf '%b %b Checking for %s\n' '\r' '[✓]' dnsutils
[✓] Checking for dnsutils
+ 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' '[✓]' iputils-ping
[✓] Checking for iputils-ping
+ for i in "$@"
+ printf ' %b Checking for %s...' '[i]' lsof
[i] Checking for lsof...+ dpkg-query -W '-f=${Status}' lsof
+ grep 'ok installed'
+ printf '%b %b Checking for %s\n' '\r' '[✓]' 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\n' '\r' '[✓]' netcat
[✓] Checking for netcat
+ for i in "$@"
+ printf ' %b Checking for %s...' '[i]' psmisc
[i] Checking for psmisc...+ dpkg-query -W '-f=${Status}' psmisc
+ grep 'ok installed'
+ printf '%b %b Checking for %s\n' '\r' '[✓]' 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' '[✓]' 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' '[✓]' 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' '[✓]' 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\n' '\r' '[✓]' idn2
[✓] Checking for idn2
+ 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\n' '\r' '[✓]' sqlite3
[✓] Checking for sqlite3
+ for i in "$@"
+ printf ' %b Checking for %s...' '[i]' libcap2-bin
[i] Checking for libcap2-bin...+ dpkg-query -W '-f=${Status}' libcap2-bin
+ grep 'ok installed'
+ printf '%b %b Checking for %s\n' '\r' '[✓]' 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\n' '\r' '[✓]' dns-root-data
[✓] Checking for dns-root-data
+ for i in "$@"
+ printf ' %b Checking for %s...' '[i]' libcap2
[i] Checking for libcap2...+ dpkg-query -W '-f=${Status}' libcap2
+ grep 'ok installed'
+ printf '%b %b Checking for %s\n' '\r' '[✓]' 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\n' '\r' '[✓]' lighttpd
[✓] Checking for lighttpd
+ for i in "$@"
+ printf ' %b Checking for %s...' '[i]' php7.0-common
[i] Checking for php7.0-common...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php7.0-common
+ printf '%b %b Checking for %s\n' '\r' '[✓]' php7.0-common
[✓] Checking for php7.0-common
+ for i in "$@"
+ printf ' %b Checking for %s...' '[i]' php7.0-cgi
[i] Checking for php7.0-cgi...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php7.0-cgi
+ printf '%b %b Checking for %s\n' '\r' '[✓]' php7.0-cgi
[✓] Checking for php7.0-cgi
+ for i in "$@"
+ printf ' %b Checking for %s...' '[i]' php7.0-sqlite3
[i] Checking for php7.0-sqlite3...+ dpkg-query -W '-f=${Status}' php7.0-sqlite3
+ grep 'ok installed'
+ printf '%b %b Checking for %s\n' '\r' '[✓]' php7.0-sqlite3
[✓] Checking for php7.0-sqlite3
+ for i in "$@"
+ printf ' %b Checking for %s...' '[i]' php7.0-xml
[i] Checking for php7.0-xml...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php7.0-xml
+ printf '%b %b Checking for %s\n' '\r' '[✓]' php7.0-xml
[✓] Checking for php7.0-xml
+ 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\n' '\r' '[✓]' php-intl
[✓] Checking for php-intl
+ [[ 0 -gt 0 ]]
+ printf '\n'
+ return 0
+ 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' '[✓]' '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\n' '\r' '[✓]' 'Checking for user '\''pihole'\'''
[✓] Checking for user 'pihole'
+ local funcOutput
++ get_binary_name
++ local machine
+++ uname -m
++ machine=armv6l
++ local l_binary
++ local 'str=Detecting architecture'
++ printf ' %b %s...' '[i]' 'Detecting architecture'
++ [[ armv6l == \a\r\m* ]]
++ local rev
+++ uname -m
+++ sed 's/[^0-9]//g;'
++ rev=6
++ local lib
+++ ldd /bin/ls
+++ grep -E '^\s*/lib'
+++ awk '{ print $1 }'
++ lib=/lib/ld-linux.so.3
++ [[ /lib/ld-linux.so.3 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\a\r\c\h\6\4\.\s\o\.\1 ]]
++ [[ /lib/ld-linux.so.3 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\r\m\h\f\.\s\o\.\3 ]]
++ [[ -f /.dockerenv ]]
++ printf '%b %b Detected ARM architecture\n' '\r' '[✓]'
++ binary=pihole-FTL-arm-linux-gnueabi
++ echo
[✓] Detected ARM architecture'
+ local binary
[✓] Detected ARM architecture'
+ local theRest
[✓] Detected ARM architecture'
[✓] Detected ARM architecture'
+ printf '\n %b FTL Checks...\n\n' '[i]'
[i] FTL Checks...
[✓] Detected ARM architecture'
[✓] Detected ARM architecture'
+ printf ' %b Checking for existing FTL binary...\n' '[i]'
[i] Checking for existing FTL binary...
+ local ftlLoc
++ which pihole-FTL
+ ftlLoc=/usr/bin/pihole-FTL
+ local ftlBranch
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=master
+ local binary
[✓] Detected ARM architecture'
+ local remoteSha1
+ local localSha1
+ which dnsmasq
+ [[ ! master == \m\a\s\t\e\r ]]
+ [[ -n /usr/bin/pihole-FTL ]]
+ local FTLversion
++ /usr/bin/pihole-FTL tag
+ FTLversion=v5.0
+ local FTLlatesttag
++ curl -sI https://github.com/pi-hole/FTL/releases/latest
++ awk -F / '{print $NF}'
++ grep --color=never -i Location
++ tr -d '[:cntrl:]'
+ FTLlatesttag=v5.0
+ [[ v5.0 != \v\5\.\0 ]]
+ printf ' %b Latest FTL Binary already installed (%s). Confirming Checksum...\n' '[i]' v5.0
[i] Latest FTL Binary already installed (v5.0). Confirming Checksum...
++ curl -sSL --fail 'https://github.com/pi-hole/FTL/releases/download/v5.0/pihole-FTL [i] Detecting archi [✓] Detected ARM architecture.sha1'
++ cut -d ' ' -f 1
curl: (3) [globbing] bad range in column 68
+ remoteSha1=
++ cut -d ' ' -f 1
+++ which pihole-FTL
++ sha1sum /usr/bin/pihole-FTL
+ localSha1=40abb43f7834fa202ca8f5dd541657469f7d6fc5
+ [[ '' != \4\0\a\b\b\4\3\f\7\8\3\4\f\a\2\0\2\c\a\8\f\5\d\d\5\4\1\6\5\7\4\6\9\f\7\d\6\f\c\5 ]]
+ printf ' %b Corruption detected...\n' '[i]'
[i] Corruption detected...
+ return 0
[✓] Detected ARM architecture'
+ 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.inLcLFg0bE
+ 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
[✓] Detected ARM architecture'
+ [[ 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 [i] Detecting arch [✓] Detected ARM architecture'
curl: (3) [globbing] bad range in column 70
+ popd
+ printf '%b %b %s\n' '\r' '[✗]' 'Downloading and Installing FTL'
[✗] Downloading and Installing FTL
+ printf ' %bError: URL %s/%s not found%b\n' '' https://github.com/pi-hole/ftl/releases/latest/download ' [✓] Detected ARM architecture' ''
Error: URL https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL [i] Detecting architectur [✓] Detected ARM architecture not found
+ return 1
+ return 1
+ printf ' %b FTL Engine not installed\n' '[✗]'
[✗] FTL Engine not installed
+ exit 1