OK, short version: it got further along in the install process, but still silently dropped me back to the command prompt.
I have included the output of the install script at the end of this message. (Sorry for the spam, all!)
I think I'm going to work on updating Ubuntu rather than fiddle with this any more.
Thanks again for the ideas, all.
~ T
Script output:
+ set -e
+ installLogLoc=/etc/pihole/install.log
+ setupVars=/etc/pihole/setupVars.conf
+ lighttpdConfig=/etc/lighttpd/lighttpd.conf
+ coltable=/opt/pihole/COL_TABLE
+ 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
+ useUpdateVars=false
+ adlistFile=/etc/pihole/adlists.list
+ regexFile=/etc/pihole/regex.list
+ IPV4_ADDRESS=
+ IPV6_ADDRESS=
+ QUERY_LOGGING=true
+ INSTALL_WEB_INTERFACE=true
+ '[' -z root ']'
++ stty size
++ echo 24 80
+ screen_size='24 80'
++ awk '{print $1}'
++ echo '24 80'
+ rows=24
++ echo '24 80'
++ awk '{print $2}'
+ columns=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'
+ echo ''
+ [[ 0 -eq 0 ]]
+ echo -e ' [\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.KgSp5A
+ exec
+ rm /tmp/pihole_temp.KgSp5A
+ distro_check
+ 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-get install --dry-run iproute2
+ iproute_pkg=iproute2
+ command -v php
+ [[ '' != true ]]
+ apt-get install --dry-run php
+ phpVer=php5
+ apt-get install --dry-run php5-sqlite3
+ phpSqlite=sqlite
+ INSTALLER_DEPS=(apt-utils dialog debconf dhcpcd5 git ${iproute_pkg} whiptail)
+ PIHOLE_DEPS=(bc cron curl dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data resolvconf)
+ PIHOLE_WEB_DEPS=(lighttpd ${phpVer}-common ${phpVer}-cgi ${phpVer}-${phpSqlite})
+ 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
++ grep -m1 '\/$'
++ df -Pk
++ awk '{print $4}'
+ existing_free_kilobytes=753676
+ [[ 753676 =~ ^([0-9])+$ ]]
+ [[ 753676 -lt 51200 ]]
+ echo -e ' [\e[1;32mβ\e[0m] Disk space check'
[β] Disk space check
+ update_package_cache
+ local 'str=Update local cache of available packages'
+ echo ''
+ echo -ne ' [i] Update local cache of available packages...'
[i] Update local cache of available packages...+ eval 'apt-get update'
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Update local cache of available packages'
[β] Update local cache of available packages
+ notify_package_updates_available
+ local 'str=Checking apt-get for upgraded packages'
+ echo -ne '\n [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/3.14.43-ti-r67 ]]
+ [[ 0 -eq 0 ]]
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking apt-get for upgraded packages... up to date!'
[β] Checking apt-get for upgraded packages... up to date!
+ echo ''
+ install_dependent_packages 'INSTALLER_DEPS[@]'
+ counter=1
+ [[ 1 == 1 ]]
+ echo -e ' [i] Installer Dependency checks...'
[i] Installer Dependency checks...
+ argArray1=("${!1}")
+ declare -a argArray1
+ declare -a installArray
+ command -v debconf-apt-progress
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for apt-utils...'
[i] Checking for apt-utils...+ dpkg-query -W '-f=${Status}' apt-utils
+ grep 'ok installed'
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for apt-utils'
[β] Checking for apt-utils
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for dialog...'
[i] Checking for dialog...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dialog
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for dialog'
[β] Checking for dialog
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for debconf...'
[i] Checking for debconf...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' debconf
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for debconf'
[β] Checking for debconf
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for dhcpcd5...'
[i] Checking for dhcpcd5...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dhcpcd5
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for dhcpcd5'
[β] Checking for dhcpcd5
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for git...'
[i] Checking for git...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' git
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for git'
[β] Checking for git
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for iproute2...'
[i] Checking for iproute2...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' iproute2
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for iproute2'
[β] Checking for iproute2
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for whiptail...'
[i] Checking for whiptail...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' whiptail
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for whiptail'
[β] Checking for whiptail
+ [[ 0 -gt 0 ]]
+ echo ''
+ return 0
+ checkSelinux
+ command -v getenforce
+ [[ 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: http://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
+ mkdir -p /etc/pihole/
+ get_available_interfaces
++ ip --oneline link show up
++ grep -v lo
++ awk '{print $2}'
++ cut -d: -f1
++ cut -d@ -f1
+ availableInterfaces='eth0
usb0'
+ chooseInterface
+ interfacesArray=()
+ local interfacesArray
+ local interfaceCount
+ local chooseInterfaceCmd
+ local chooseInterfaceOptions
+ local firstLoop=1
++ echo 'eth0
++ wc -l
usb0'
+ interfaceCount=2
+ [[ 2 -eq 1 ]]
+ read -r line
+ mode=OFF
+ [[ 1 -eq 1 ]]
+ firstLoop=0
+ mode=ON
+ interfacesArray+=("${line}" "available" "${mode}")
+ read -r line
+ mode=OFF
+ [[ 0 -eq 1 ]]
+ interfacesArray+=("${line}" "available" "${mode}")
+ read -r line
+ chooseInterfaceCmd=(whiptail --separate-output --radiolist "Choose An Interface (press space to select)" ${r} ${c} ${interfaceCount})
++ whiptail --separate-output --radiolist 'Choose An Interface (press space to select)' 20 70 2 eth0 available ON usb0 available OFF
+ chooseInterfaceOptions=eth0
+ for desiredInterface in '${chooseInterfaceOptions}'
+ PIHOLE_INTERFACE=eth0
+ echo -e ' [i] Using interface: eth0'
[i] Using interface: eth0
+ setDNS
+ local DNSSettingsCorrect
+ DNSChooseOptions=(Google "" OpenDNS "" Level3 "" Norton "" Comodo "" DNSWatch "" Quad9 "" FamilyShield "" Cloudflare "" Custom "")
++ whiptail --separate-output --menu 'Select Upstream DNS Provider. To use your own, select Custom.' 20 70 7 Google '' OpenDNS '' Level3 '' Norton '' Comodo '' DNSWatch '' Quad9 '' FamilyShield '' Cloudflare '' Custom ''
+ DNSchoices=Google
+ echo -ne ' [i] Using '
[i] Using + case ${DNSchoices} in
+ echo 'Google DNS servers'
Google DNS servers
+ PIHOLE_DNS_1=8.8.8.8
+ PIHOLE_DNS_2=8.8.4.4
+ chooseBlocklists
+ [[ -f /etc/pihole/adlists.list ]]
+ mv /etc/pihole/adlists.list /etc/pihole/adlists.list.old
+ 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}" 7)
+ options=(StevenBlack "StevenBlack's Unified Hosts List" on MalwareDom "MalwareDomains" on Cameleon "Cameleon" on ZeusTracker "ZeusTracker" on DisconTrack "Disconnect.me Tracking" on DisconAd "Disconnect.me Ads" on HostsFile "Hosts-file.net Ads" 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 7 StevenBlack 'StevenBlack'\''s Unified Hosts List' on MalwareDom MalwareDomains on Cameleon Cameleon on ZeusTracker ZeusTracker on DisconTrack 'Disconnect.me Tracking' on DisconAd 'Disconnect.me Ads' on HostsFile 'Hosts-file.net Ads' on
+ choices='StevenBlack
MalwareDom
Cameleon
ZeusTracker
DisconTrack
DisconAd
HostsFile'
+ for choice in '${choices}'
+ case ${choice} in
+ echo https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
+ for choice in '${choices}'
+ case ${choice} in
+ echo https://mirror1.malwaredomains.com/files/justdomains
+ for choice in '${choices}'
+ case ${choice} in
+ echo http://sysctl.org/cameleon/hosts
+ for choice in '${choices}'
+ case ${choice} in
+ echo 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist'
+ for choice in '${choices}'
+ case ${choice} in
+ echo https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
+ for choice in '${choices}'
+ case ${choice} in
+ echo https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
+ for choice in '${choices}'
+ case ${choice} in
+ echo https://hosts-file.net/ad_servers.txt
+ use4andor6
+ local useIPv4
+ local useIPv6
+ cmd=(whiptail --separate-output --checklist "Select Protocols (press space to select)" ${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 select)' 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
++ ip route get 8.8.8.8
+ route='8.8.8.8 via 192.168.0.1 dev eth0 src 192.168.0.200
cache '
++ awk '{for (i=1; i<=NF; i++) if ($i~/dev/) print $(i+1)}'
+ IPv4dev=eth0
++ awk '{print $7}'
+ IPv4bare=192.168.0.200
++ ip -o -f inet addr show
++ grep 192.168.0.200
++ awk 'END {print}'
++ awk '{print $4}'
+ IPV4_ADDRESS=192.168.0.200/24
++ awk '{print $3}'
+ IPv4gw=192.168.0.1
+ 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: 192.168.0.200/24
Gateway: 192.168.0.1' 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 IPADDR
+ local CIDR
+ [[ -f /etc/dhcpcd.conf ]]
+ grep -q 192.168.0.200/24 /etc/dhcpcd.conf
+ echo -e ' [i] Static IP already configured'
[i] Static IP already configured
+ [[ -n true ]]
+ useIPv6dialog
+ IPV6_ADDRESSES=($(ip -6 address | grep 'scope global' | awk '{print $2}'))
++ ip -6 address
++ grep 'scope global'
++ awk '{print $2}'
+ [[ ! -z '' ]]
+ [[ ! -z '' ]]
+ echo -e ' [i] Unable to find IPv6 ULA/GUA address, IPv6 adblocking will not be enabled'
[i] Unable to find IPv6 ULA/GUA address, IPv6 adblocking will not be enabled
+ IPV6_ADDRESS=
+ [[ ! -z '' ]]
+ echo -e ' [i] IPv4 address: 192.168.0.200/24'
[i] IPv4 address: 192.168.0.200/24
+ echo -e ' [i] IPv6 address: '
[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
+ echo -e ' [i] Web Interface On'
[i] Web Interface On
+ INSTALL_WEB_INTERFACE=true
+ [[ true == true ]]
+ WebToggleCommand=(whiptail --separate-output --radiolist "Do you wish to install the web server (lighttpd)?\\n\\nNB: If you disable this, and, do not have an existing webserver installed, the web interface will not function." "${r}" "${c}" 6)
+ WebChooseOptions=("On (Recommended)" "" on Off "" off)
++ whiptail --separate-output --radiolist 'Do you wish to install the web server (lighttpd)?\n\nNB: If you disable this, and, do not have an existing webserver installed, the web interface will not function.' 20 70 6 'On (Recommended)' '' on Off '' off
+ WebChoices='On (Recommended)'
+ case ${WebChoices} in
+ echo -e ' [i] Web Server On'
[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
+ echo -e ' [i] Logging On.'
[i] Logging On.
+ QUERY_LOGGING=true
+ 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'
+ echo -ne ' [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 curdir
+ local rc
+ curdir=/home/ubuntu
+ [[ -d /etc/.pihole ]]
+ cd /etc/.pihole
+ git status --short
+ cd /home/ubuntu
+ return 0
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Check for existing repository in /etc/.pihole'
[β] Check for existing repository in /etc/.pihole
+ update_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local curdir
+ local 'str=Update repo in /etc/.pihole'
+ curdir=/home/ubuntu
+ cd /etc/.pihole
+ echo -ne ' [i] Update repo in /etc/.pihole...'
[i] Update repo in /etc/.pihole...+ git stash --all --quiet
+ true
+ git clean --quiet --force -d
+ git pull --quiet
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Update repo in /etc/.pihole'
[β] Update repo in /etc/.pihole
+ cd /home/ubuntu
+ 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'
+ echo -ne ' [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 curdir
+ local rc
+ curdir=/home/ubuntu
+ [[ -d /var/www/html/admin ]]
+ cd /var/www/html/admin
+ git status --short
+ cd /home/ubuntu
+ return 0
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] 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 curdir
+ local 'str=Update repo in /var/www/html/admin'
+ curdir=/home/ubuntu
+ cd /var/www/html/admin
+ echo -ne ' [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
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Update repo in /var/www/html/admin'
[β] Update repo in /var/www/html/admin
+ cd /home/ubuntu
+ 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 'dep_install_list[@]'
+ counter=2
+ [[ 2 == 1 ]]
+ echo -e ' [i] Main Dependency checks...'
[i] Main Dependency checks...
+ argArray1=("${!1}")
+ declare -a argArray1
+ declare -a installArray
+ command -v debconf-apt-progress
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for bc...'
[i] Checking for bc...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' bc
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for bc'
[β] Checking for bc
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for cron...'
[i] Checking for cron...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' cron
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for cron'
[β] Checking for cron
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for curl...'
[i] Checking for curl...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' curl
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for curl'
[β] Checking for curl
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for dnsutils...'
[i] Checking for dnsutils...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dnsutils
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for dnsutils'
[β] Checking for dnsutils
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for iputils-ping...'
[i] Checking for iputils-ping...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' iputils-ping
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for iputils-ping'
[β] Checking for iputils-ping
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for lsof...'
[i] Checking for lsof...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' lsof
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for lsof'
[β] Checking for lsof
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for netcat...'
[i] Checking for netcat...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' netcat
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for netcat'
[β] Checking for netcat
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for psmisc...'
[i] Checking for psmisc...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' psmisc
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for psmisc'
[β] Checking for psmisc
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for sudo...'
[i] Checking for sudo...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' sudo
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for sudo'
[β] Checking for sudo
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for unzip...'
[i] Checking for unzip...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' unzip
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for unzip'
[β] Checking for unzip
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for wget...'
[i] Checking for wget...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' wget
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for wget'
[β] Checking for wget
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for idn2...'
[i] Checking for idn2...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' idn2
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for idn2'
[β] Checking for idn2
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for sqlite3...'
[i] Checking for sqlite3...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' sqlite3
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for sqlite3'
[β] Checking for sqlite3
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for libcap2-bin...'
[i] Checking for libcap2-bin...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' libcap2-bin
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for libcap2-bin'
[β] Checking for libcap2-bin
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for dns-root-data...'
[i] Checking for dns-root-data...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' dns-root-data
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for dns-root-data'
[β] Checking for dns-root-data
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for resolvconf...'
[i] Checking for resolvconf...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' resolvconf
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for resolvconf'
[β] Checking for resolvconf
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for lighttpd...'
[i] Checking for lighttpd...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' lighttpd
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for lighttpd'
[β] Checking for lighttpd
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for php5-common...'
[i] Checking for php5-common...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php5-common
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for php5-common'
[β] Checking for php5-common
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for php5-cgi...'
[i] Checking for php5-cgi...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php5-cgi
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for php5-cgi'
[β] Checking for php5-cgi
+ for i in '"${argArray1[@]}"'
+ echo -ne ' [i] Checking for php5-sqlite...'
[i] Checking for php5-sqlite...+ grep 'ok installed'
+ dpkg-query -W '-f=${Status}' php5-sqlite
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Checking for php5-sqlite'
[β] Checking for php5-sqlite
+ [[ 0 -gt 0 ]]
+ echo ''
+ return 0
+ unset dep_install_list
+ [[ true == true ]]
+ enable_service lighttpd
+ local 'str=Enabling lighttpd service to start on reboot'
+ echo -ne ' [i] Enabling lighttpd service to start on reboot...'
[i] Enabling lighttpd service to start on reboot...+ command -v systemctl
+ update-rc.d lighttpd defaults
+ echo -e '\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
+ command -v systemctl
+ service lighttpd status
+ LIGHTTPD_ENABLED=true
+ installPihole
+ create_pihole_user
+ tee -a /proc/31445/fd/3
+ local 'str=Checking for user '\''pihole'\'''
+ echo -ne ' [i] Checking for user '\''pihole'\''...'
+ id -u pihole
[i] Checking for user 'pihole'...+ echo -ne '\r\033[K [\e[1;31mβ\e[0m] Checking for user '\''pihole'\'''
+ local 'str=Creating user '\''pihole'\'''
+ echo -ne ' [i] Creating user '\''pihole'\''...'
[β] Checking for user 'pihole'+ useradd -r -s /usr/sbin/nologin pihole
[i] Creating user 'pihole'...+ echo -ne '\r\033[K [\e[1;32mβ\e[0m] Creating user '\''pihole'\'''
+ [[ true == true ]]
+ [[ ! -d /var/www/html ]]
[β] Creating user 'pihole'+ [[ true == true ]]
+ chown www-data:www-data /var/www/html
+ chmod 775 /var/www/html
+ usermod -a -G www-data pihole
++ command -v lighty-enable-mod
+ [[ -x /usr/sbin/lighty-enable-mod ]]
+ lighty-enable-mod fastcgi fastcgi-php
+ true
+ [[ false == true ]]
+ installScripts
+ local 'str=Installing scripts from /etc/.pihole'
+ echo -ne ' [i] Installing scripts from /etc/.pihole...'
[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
+ 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 curdir
+ local rc
+ curdir=/home/ubuntu
+ [[ -d /etc/.pihole ]]
+ cd /etc/.pihole
+ git status --short
+ cd /home/ubuntu
+ return 0
+ cd /etc/.pihole
+ install -o root -Dm755 -d /opt/pihole
+ install -o root -Dm755 -t /opt/pihole gravity.sh
install: cannot stat βgravity.shβ: No such file or directory
+ install -o root -Dm755 -t /opt/pihole './advanced/Scripts/*.sh'
install: cannot stat β./advanced/Scripts/*.shβ: No such file or directory
+ install -o root -Dm755 -t /opt/pihole './automated install/uninstall.sh'
install: cannot stat β./automated install/uninstall.shβ: No such file or directory
+ install -o root -Dm755 -t /opt/pihole ./advanced/Scripts/COL_TABLE
install: cannot stat β./advanced/Scripts/COL_TABLEβ: No such file or directory
+ install -o root -Dm755 -t /usr/local/bin/ pihole
install: cannot stat βpiholeβ: No such file or directory
+ install -Dm644 ./advanced/bash-completion/pihole /etc/bash_completion.d/pihole
install: cannot stat β./advanced/bash-completion/piholeβ: No such file or directory
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Installing scripts from /etc/.pihole'
+ installConfigs
[β] Installing scripts from /etc/.pihole
+ echo ''
+ echo -e ' [i] Installing configs from /etc/.pihole...'
[i] Installing configs from /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_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 ]]
+ echo -ne ' [i] Existing dnsmasq.conf found...'
[i] Existing dnsmasq.conf found...+ grep -q addn-hosts=/etc/pihole/gravity.list /etc/dnsmasq.conf
+ echo ' it is not a Pi-hole file, leaving alone!'
+ echo -en ' [i] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf...'
+ [[ ! -d /etc/dnsmasq.d ]]
it is not a Pi-hole file, leaving alone!
[i] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf...+ cp /etc/.pihole/advanced/01-pihole.conf /etc/dnsmasq.d/01-pihole.conf
cp: cannot stat β/etc/.pihole/advanced/01-pihole.confβ: No such file or directory
+ echo -e '\r\033[K [\e[1;32mβ\e[0m] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf'
+ sed -i s/@INT@/eth0/ /etc/dnsmasq.d/01-pihole.conf
[β] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
sed: can't read /etc/dnsmasq.d/01-pihole.conf: No such file or directory
+ [[ 8.8.8.8 != '' ]]
+ sed -i s/@DNS1@/8.8.8.8/ /etc/dnsmasq.d/01-pihole.conf
sed: can't read /etc/dnsmasq.d/01-pihole.conf: No such file or directory
+ [[ 8.8.4.4 != '' ]]
+ sed -i s/@DNS2@/8.8.4.4/ /etc/dnsmasq.d/01-pihole.conf
sed: can't read /etc/dnsmasq.d/01-pihole.conf: No such file or directory
+ 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
sed: can't read /etc/dnsmasq.d/01-pihole.conf: No such file or directory
+ [[ ! -f /etc/pihole/pihole-FTL.conf ]]
+ install -o pihole -g pihole -m 664 /dev/null /etc/pihole/pihole-FTL.conf
+ [[ ! -f /etc/pihole/regex.list ]]
+ install -o pihole -g www-data -m 664 /dev/null /etc/pihole/regex.list
+ [[ true == true ]]
+ [[ ! -d /etc/lighttpd ]]
+ [[ -f /etc/lighttpd/lighttpd.conf ]]
+ mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
+ cp /etc/.pihole/advanced/lighttpd.conf.debian /etc/lighttpd/lighttpd.conf
cp: cannot stat β/etc/.pihole/advanced/lighttpd.conf.debianβ: No such file or directory
+ [[ -f /var/www/html/pihole/custom.php ]]
+ mkdir -p /var/run/lighttpd
+ chown www-data:www-data /var/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
+ echo ''
+ echo ' [i] Installing blocking page...'
[i] Installing blocking page...
+ local 'str=Creating directory for blocking page, and copying files'
+ echo -ne ' [i] Creating directory for blocking page, and copying files...'
[i] Creating directory for blocking page, and copying files...+ install -d /var/www/html/pihole
+ install -D '/etc/.pihole/advanced/index.*' '/etc/.pihole/advanced/blockingpage.*' /var/www/html/pihole/
install: cannot stat β/etc/.pihole/advanced/index.*β: No such file or directory
install: cannot stat β/etc/.pihole/advanced/blockingpage.*β: No such file or directory
+ copy_to_install_log
+ sed 's/[[0-9;]\{1,5\}m//g'
+ [[ true == true ]]
+ pw=
++ grep WEBPASSWORD -c /etc/pihole/setupVars.conf
grep: /etc/pihole/setupVars.conf: No such file or directory
+ [[ '' == 0 ]]
+ disable_resolved_stublistener
+ echo -en ' [i] Testing if systemd-resolved is enabled'
[i] Testing if systemd-resolved is enabled+ check_service_active systemd-resolved
+ command -v systemctl
+ service systemd-resolved status
+ echo -e '\r\033[K [i] Systemd-resolved is not enabled'
[i] Systemd-resolved is not enabled
+ [[ true == true ]]
+ [[ true == true ]]
+ start_service lighttpd
+ local 'str=Starting lighttpd service'
+ echo -ne ' [i] Starting lighttpd service...'
[i] Starting lighttpd service...+ command -v systemctl
+ service lighttpd restart