Expected Behaviour:
[Installing pi-hole succesfully on a Lenovo B50-10 computer running pop os (first setup)]
Actual Behaviour:
_[I start the script by writing `sudo bash -x basic-install.sh` then I see this output:
`+ 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=GitHub - pi-hole/web: Pi-hole Dashboard for stats and more
-
webInterfaceDir=/var/www/html/admin
-
piholeGitUrl=GitHub - pi-hole/pi-hole: A black hole for Internet advertisements
-
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='24 80'
-
printf -v rows %d 24
-
printf -v columns %d 80
-
r=12
-
c=40
-
r=20
-
c=70
-
skipSpaceCheck=false
-
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.53SjtU
-
exec
-
rm /tmp/pihole_temp.53SjtU
-
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
++ php -
printf ' %b Existing PHP installation detected : PHP version %s\n' '[i]' 7.4.3
[i] Existing PHP installation detected : PHP version 7.4.3
++ php -
printf -v phpInsMajor %d 7
++ php -
printf -v phpInsMinor %d 4
-
'[' 7 -ge 7 ']'
-
phpInsNewer=true
-
[[ true != true ]]
-
phpVer=php7.4
-
apt-cache show php7.4-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}-intl")
-
LIGHTTPD_USER=www-data
-
LIGHTTPD_GROUP=www-data
-
LIGHTTPD_CFG=lighttpd.conf.debian
-
[[ -f /etc/pihole/setupVars.conf ]]
-
[[ 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=36624396
-
[[ 36624396 =~ ^([0-9])+$ ]]
-
[[ 36624396 -lt 51200 ]]
-
printf ' %b %s\n' '[\e[1;32m✓\e[0m]' 'Disk space check'
[✓] Disk space check -
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
+++ true -
updatesToInstall=0
++ uname -r -
[[ -d /lib/modules/5.4.0-7642-generic ]]
-
[[ 0 -eq 0 ]]
-
printf '%b %b %s... up to date!\n\n' '\r\033[K' '[\e[1;32m✓\e[0m]' 'Checking apt-get for upgraded packages'
[✓] Checking apt-get for upgraded packages... up to date! -
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...+ dpkg-query -W '-f=${Status}' dhcpcd5 -
grep 'ok installed'
-
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...+ dpkg-query -W '-f=${Status}' dnsutils -
grep 'ok installed'
-
printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' dnsutils
[✓] Checking for dnsutils -
[[ 0 -gt 0 ]]
-
printf '\n'
-
return 0
-
os_check
-
'[' '' '!=' true ']'
-
local remote_os_domain valid_os valid_version detected_os_pretty detected_os detected_version display_warning
-
remote_os_domain=versions.pi-hole.net
-
valid_os=false
-
valid_version=false
-
display_warning=true
++ cat /etc/lsb-release /etc/os-release
++ grep PRETTY_NAME
++ cut -d = -f2-
++ tr -d '"' -
detected_os_pretty='Pop!_OS 20.04 LTS'
-
detected_os='Pop!_OS'
++ cat /etc/lsb-release /etc/os-release
++ grep VERSION_ID
++ cut -d = -f2-
++ tr -d '"' -
detected_version=20.04
-
IFS=' '
-
read -r -a supportedOS
++ dig +short -t txt versions.pi-hole.net @ns1.pi-hole.net
++ tr -d '"'
`]_
Debug Token:
[I'm not able to run pihole -d]