Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pi@raspberrypi:~ $ wget -O basic-install.sh https://install.pi-hole.net
- --2019-03-12 21:35:15-- https://install.pi-hole.net/
- Resolving install.pi-hole.net (install.pi-hole.net)... 78.46.180.80
- Connecting to install.pi-hole.net (install.pi-hole.net)|78.46.180.80|:443... connected.
- HTTP request sent, awaiting response... 302 Found
- Location: https://raw.githubusercontent.com/pi-hole/pi-hole/master/automated%20install/basic-install.sh [following]
- --2019-03-12 21:35:16-- https://raw.githubusercontent.com/pi-hole/pi-hole/master/automated%20install/basic-install.sh
- Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.184.133
- Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.184.133|:443... connected.
- HTTP request sent, awaiting response... 200 OK
- Length: 112248 (110K) [text/plain]
- Saving to: ‘basic-install.sh’
- basic-install.sh 100%[===================>] 109.62K --.-KB/s in 0.08s
- 2019-03-12 21:35:17 (1.36 MB/s) - ‘basic-install.sh’ saved [112248/112248]
- pi@raspberrypi:~ $ sudo bash -x basic-install.sh
- + 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
- + PRIVACY_LEVEL=0
- + '[' -z root ']'
- ++ 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'
- + binary=tbd
- + 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.3maWop
- + exec
- + rm /tmp/pihole_temp.3maWop
- + 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
- + [[ '' != true ]]
- + apt-get install --dry-run php
- + phpVer=php
- + apt-get install --dry-run php-sqlite3
- + phpSqlite=sqlite3
- + INSTALLER_DEPS=(apt-utils dialog debconf 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 resolvconf libcap2)
- + 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
- ++ df -Pk
- ++ grep -m1 '\/$'
- ++ awk '{print $4}'
- + existing_free_kilobytes=111728648
- + [[ 111728648 =~ ^([0-9])+$ ]]
- + [[ 111728648 -lt 51200 ]]
- + printf ' %b %s\n' '[\e[1;32m✓\e[0m]' '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\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'
- + 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.98-v7+ ]]
- + [[ 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 'INSTALLER_DEPS[@]'
- + counter=1
- + [[ 1 == 1 ]]
- + printf ' %b Installer Dependency checks...\n' '[i]'
- [i] Installer Dependency checks...
- + argArray1=("${!1}")
- + declare -a argArray1
- + declare -a installArray
- + is_command debconf-apt-progress
- + local check_command=debconf-apt-progress
- + command -v debconf-apt-progress
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' apt-utils
- [i] Checking for apt-utils...+ dpkg-query -W '-f=${Status}' apt-utils
- + grep 'ok installed'
- + printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' apt-utils
- [✓] Checking for apt-utils
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' dialog
- [i] Checking for dialog...+ dpkg-query -W '-f=${Status}' dialog
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for dialog (will be installed)'
- [i] Checking for dialog (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' debconf
- [i] Checking for debconf...+ dpkg-query -W '-f=${Status}' debconf
- + grep 'ok installed'
- + printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' debconf
- [✓] Checking for debconf
- + for i in "${argArray1[@]}"
- + 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 "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' git
- [i] Checking for git...+ dpkg-query -W '-f=${Status}' git
- + grep 'ok installed'
- + printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' git
- [✓] Checking for git
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' iproute2
- [i] Checking for iproute2...+ dpkg-query -W '-f=${Status}' iproute2
- + grep 'ok installed'
- + printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' iproute2
- [✓] Checking for iproute2
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' whiptail
- [i] Checking for whiptail...+ dpkg-query -W '-f=${Status}' whiptail
- + grep 'ok installed'
- + printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' whiptail
- [✓] Checking for whiptail
- + [[ 1 -gt 0 ]]
- + test_dpkg_lock
- + i=0
- + fuser /var/lib/dpkg/lock
- + return 0
- + debconf-apt-progress -- apt-get --yes --no-install-recommends install dialog
- + return
- + checkSelinux
- + is_command getenforce
- + local check_command=getenforce
- + 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
- wlan0'
- + chooseInterface
- + interfacesArray=()
- + local interfacesArray
- + local interfaceCount
- + local chooseInterfaceCmd
- + local chooseInterfaceOptions
- + local firstLoop=1
- ++ wc -l
- + 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 wlan0 available OFF
- + chooseInterfaceOptions=eth0
- + for desiredInterface in ${chooseInterfaceOptions}
- + PIHOLE_INTERFACE=eth0
- + printf ' %b Using interface: %s\n' '[i]' eth0
- [i] Using interface: eth0
- + setDNS
- + local DNSSettingsCorrect
- + DNSChooseOptions=(Google "" OpenDNS "" Level3 "" 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 '' Comodo '' DNSWatch '' Quad9 '' FamilyShield '' Cloudflare '' Custom ''
- + DNSchoices=Google
- + printf ' %b Using ' '[i]'
- [i] Using + case ${DNSchoices} in
- + printf 'Google DNS servers\n'
- Google DNS servers
- + PIHOLE_DNS_1=8.8.8.8
- + PIHOLE_DNS_2=8.8.4.4
- + 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}" 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}
- + 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
- + for choice in ${choices}
- + appendToListsFile Cameleon
- + case $1 in
- + echo http://sysctl.org/cameleon/hosts
- + for choice in ${choices}
- + appendToListsFile ZeusTracker
- + case $1 in
- + echo 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist'
- + for choice in ${choices}
- + appendToListsFile DisconTrack
- + case $1 in
- + echo https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
- + for choice in ${choices}
- + appendToListsFile DisconAd
- + case $1 in
- + echo https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
- + for choice in ${choices}
- + appendToListsFile HostsFile
- + case $1 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
- + for choice in ${choices}
- + case ${choice} in
- + useIPv4=true
- + [[ -n true ]]
- + find_IPv4_information
- + local route
- + local IPv4bare
- ++ ip route get 8.8.8.8
- + route='8.8.8.8 via 10.149.0.1 dev eth0 src 10.149.0.14
- cache '
- ++ printf 10.149.0.14 cache
- + printf -v IPv4bare 10.149.0.14
- ++ printf 10.149.0.1 dev eth0 src 10.149.0.14 cache
- + printf -v IPv4gw 10.149.0.1
- + valid_ip 10.149.0.14
- + local ip=10.149.0.14
- + local stat=1
- + [[ 10.149.0.14 =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]
- + OIFS='
- '
- + IFS=.
- + ip=(${ip})
- + IFS='
- '
- + [[ 10 -le 255 ]]
- + [[ 149 -le 255 ]]
- + [[ 0 -le 255 ]]
- + [[ 14 -le 255 ]]
- + stat=0
- + return 0
- ++ ip -oneline -family inet address show
- ++ awk '{print $4}'
- ++ awk 'END {print}'
- ++ grep 10.149.0.14
- + IPV4_ADDRESS=10.149.0.14/16
- + 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.149.0.14/16
- Gateway: 10.149.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 CONNECTION_NAME
- + [[ -f /etc/dhcpcd.conf ]]
- + setDHCPCD
- + grep -q 10.149.0.14/16 /etc/dhcpcd.conf
- + echo 'interface eth0
- static ip_address=10.149.0.14/16
- static routers=10.149.0.1
- static domain_name_servers=127.0.0.1'
- + tee -a /etc/dhcpcd.conf
- + ip addr replace dev eth0 10.149.0.14/16
- + printf ' %b Set IP address to %s \n You may need to restart after the install is complete\n' '[\e[1;32m✓\e[0m]' 10.149.0.14
- [✓] Set IP address to 10.149.0.14
- You may need to restart after the install is complete
- + return 0
- + [[ -n '' ]]
- + printf ' %b IPv4 address: %s\n' '[i]' 10.149.0.14/16
- [i] IPv4 address: 10.149.0.14/16
- + 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 ]]
- + 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
- + 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." "${r}" "${c}" 6)
- + LevelOptions=("0" "Show everything" on "1" "Hide domains" off "2" "Hide domains and clients" off "3" "Anonymous mode" off "4" "Disabled statistics" off)
- ++ whiptail --separate-output --radiolist 'Select a privacy mode for FTL.' 20 70 6 0 'Show everything' on 1 'Hide domains' off 2 'Hide domains and clients' off 3 'Anonymous mode' off 4 'Disabled statistics' 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 curdir
- + local rc
- + curdir=/home/pi
- + [[ -d /etc/.pihole ]]
- + rc=1
- + cd /home/pi
- + 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 1 https://github.com/pi-hole/pi-hole.git /etc/.pihole
- + 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
- + 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 curdir
- + local rc
- + curdir=/home/pi
- + [[ -d /var/www/html/admin ]]
- + rc=1
- + cd /home/pi
- + 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 1 https://github.com/pi-hole/AdminLTE.git /var/www/html/admin
- + 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
- + 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 ]]
- + printf ' %b Main Dependency checks...\n' '[i]'
- [i] Main Dependency checks...
- + argArray1=("${!1}")
- + declare -a argArray1
- + declare -a installArray
- + is_command debconf-apt-progress
- + local check_command=debconf-apt-progress
- + command -v debconf-apt-progress
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' cron
- [i] Checking for cron...+ dpkg-query -W '-f=${Status}' cron
- + grep 'ok installed'
- + printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' cron
- [✓] Checking for cron
- + for i in "${argArray1[@]}"
- + 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\033[K' '[\e[1;32m✓\e[0m]' curl
- [✓] Checking for curl
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' dnsutils
- [i] Checking for dnsutils...+ dpkg-query -W '-f=${Status}' dnsutils
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for dnsutils (will be installed)'
- [i] Checking for dnsutils (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' iputils-ping
- [i] Checking for iputils-ping...+ dpkg-query -W '-f=${Status}' iputils-ping
- + grep 'ok installed'
- + printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' iputils-ping
- [✓] Checking for iputils-ping
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' lsof
- [i] Checking for lsof...+ dpkg-query -W '-f=${Status}' lsof
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for lsof (will be installed)'
- [i] Checking for lsof (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' netcat
- [i] Checking for netcat...+ dpkg-query -W '-f=${Status}' netcat
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for netcat (will be installed)'
- [i] Checking for netcat (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + 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\033[K' '[\e[1;32m✓\e[0m]' psmisc
- [✓] Checking for psmisc
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' sudo
- [i] Checking for sudo...+ dpkg-query -W '-f=${Status}' sudo
- + grep 'ok installed'
- + printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' sudo
- [✓] Checking for sudo
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' unzip
- [i] Checking for unzip...+ dpkg-query -W '-f=${Status}' unzip
- + grep 'ok installed'
- + printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' unzip
- [✓] Checking for unzip
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' wget
- [i] Checking for wget...+ dpkg-query -W '-f=${Status}' wget
- + grep 'ok installed'
- + printf '%b %b Checking for %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' wget
- [✓] Checking for wget
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' idn2
- [i] Checking for idn2...+ dpkg-query -W '-f=${Status}' idn2
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for idn2 (will be installed)'
- [i] Checking for idn2 (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' sqlite3
- [i] Checking for sqlite3...+ dpkg-query -W '-f=${Status}' sqlite3
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for sqlite3 (will be installed)'
- [i] Checking for sqlite3 (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + 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\033[K' '[\e[1;32m✓\e[0m]' libcap2-bin
- [✓] Checking for libcap2-bin
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' dns-root-data
- [i] Checking for dns-root-data...+ dpkg-query -W '-f=${Status}' dns-root-data
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for dns-root-data (will be installed)'
- [i] Checking for dns-root-data (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' resolvconf
- [i] Checking for resolvconf...+ dpkg-query -W '-f=${Status}' resolvconf
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for resolvconf (will be installed)'
- [i] Checking for resolvconf (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + 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\033[K' '[\e[1;32m✓\e[0m]' libcap2
- [✓] Checking for libcap2
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' lighttpd
- [i] Checking for lighttpd...+ dpkg-query -W '-f=${Status}' lighttpd
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for lighttpd (will be installed)'
- [i] Checking for lighttpd (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' php-common
- [i] Checking for php-common...+ dpkg-query -W '-f=${Status}' php-common
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for php-common (will be installed)'
- [i] Checking for php-common (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' php-cgi
- [i] Checking for php-cgi...+ dpkg-query -W '-f=${Status}' php-cgi
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for php-cgi (will be installed)'
- [i] Checking for php-cgi (will be installed)
- + installArray+=("${i}")
- + for i in "${argArray1[@]}"
- + printf ' %b Checking for %s...' '[i]' php-sqlite3
- [i] Checking for php-sqlite3...+ dpkg-query -W '-f=${Status}' php-sqlite3
- + grep 'ok installed'
- + echo -e '\r\033[K [i] Checking for php-sqlite3 (will be installed)'
- [i] Checking for php-sqlite3 (will be installed)
- + installArray+=("${i}")
- + [[ 11 -gt 0 ]]
- + test_dpkg_lock
- + i=0
- + fuser /var/lib/dpkg/lock
- + return 0
- + debconf-apt-progress -- apt-get --yes --no-install-recommends install dnsutils lsof netcat idn2 sqlite3 dns-root-data resolvconf lighttpd php-common php-cgi php-sqlite3
- + 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
- + FTLdetect
- + printf '\n %b FTL Checks...\n\n' '[i]'
- [i] FTL Checks...
- + FTLcheckUpdate
- + get_binary_name
- + local machine
- ++ uname -m
- + machine=armv7l
- + local 'str=Detecting architecture'
- + printf ' %b %s...' '[i]' 'Detecting architecture'
- [i] Detecting architecture...+ [[ armv7l == \a\r\m* ]]
- + local rev
- ++ uname -m
- ++ sed 's/[^0-9]//g;'
- + rev=7
- + local lib
- ++ ldd /bin/ls
- ++ grep -E '^\s*/lib'
- ++ awk '{ print $1 }'
- + lib=/lib/ld-linux-armhf.so.3
- + [[ /lib/ld-linux-armhf.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-armhf.so.3 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\r\m\h\f\.\s\o\.\3 ]]
- + [[ 7 -gt 6 ]]
- + printf '%b %b Detected ARM-hf architecture (armv7+)\n' '\r\033[K' '[\e[1;32m✓\e[0m]'
- [✓] Detected ARM-hf architecture (armv7+)
- + binary=pihole-FTL-arm-linux-gnueabihf
- + 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 remoteSha1
- + local localSha1
- + which dnsmasq
- + [[ ! master == \m\a\s\t\e\r ]]
- + [[ -n '' ]]
- + return 0
- + FTLinstall
- + local latesttag
- + local 'str=Downloading and Installing FTL'
- + printf ' %b %s...' '[i]' 'Downloading and Installing FTL'
- [i] Downloading and Installing FTL...++ curl -sI https://github.com/pi-hole/FTL/releases/latest
- ++ grep Location
- ++ awk -F / '{print $NF}'
- + latesttag=
- + [[ ! '' == v* ]]
- + printf '%b %b %s\n' '\r\033[K' '[\e[1;31m✗\e[0m]' 'Downloading and Installing FTL'
- [✗] Downloading and Installing FTL
- + printf ' %bError: Unable to get latest release location from GitHub%b\n' '\e[1;31m' '\e[0m'
- Error: Unable to get latest release location from GitHub
- + return 1
- + return 1
- + printf ' %b FTL Engine not installed\n' '[\e[1;31m✗\e[0m]'
- [✗] FTL Engine not installed
- + exit 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement