SHARE
TWEET

Untitled

a guest Mar 12th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pi@raspberrypi:~ $ wget -O basic-install.sh https://install.pi-hole.net
  2. --2019-03-12 21:35:15--  https://install.pi-hole.net/
  3. Resolving install.pi-hole.net (install.pi-hole.net)... 78.46.180.80
  4. Connecting to install.pi-hole.net (install.pi-hole.net)|78.46.180.80|:443... connected.
  5. HTTP request sent, awaiting response... 302 Found
  6. Location: https://raw.githubusercontent.com/pi-hole/pi-hole/master/automated%20install/basic-install.sh [following]
  7. --2019-03-12 21:35:16--  https://raw.githubusercontent.com/pi-hole/pi-hole/master/automated%20install/basic-install.sh
  8. Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.184.133
  9. Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.184.133|:443... connected.
  10. HTTP request sent, awaiting response... 200 OK
  11. Length: 112248 (110K) [text/plain]
  12. Saving to: β€˜basic-install.sh’
  13.  
  14. basic-install.sh    100%[===================>] 109.62K  --.-KB/s    in 0.08s  
  15.  
  16. 2019-03-12 21:35:17 (1.36 MB/s) - β€˜basic-install.sh’ saved [112248/112248]
  17.  
  18. pi@raspberrypi:~ $ sudo bash -x basic-install.sh
  19. + set -e
  20. + installLogLoc=/etc/pihole/install.log
  21. + setupVars=/etc/pihole/setupVars.conf
  22. + lighttpdConfig=/etc/lighttpd/lighttpd.conf
  23. + coltable=/opt/pihole/COL_TABLE
  24. + webInterfaceGitUrl=https://github.com/pi-hole/AdminLTE.git
  25. + webInterfaceDir=/var/www/html/admin
  26. + piholeGitUrl=https://github.com/pi-hole/pi-hole.git
  27. + PI_HOLE_LOCAL_REPO=/etc/.pihole
  28. + PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)
  29. + PI_HOLE_INSTALL_DIR=/opt/pihole
  30. + PI_HOLE_CONFIG_DIR=/etc/pihole
  31. + useUpdateVars=false
  32. + adlistFile=/etc/pihole/adlists.list
  33. + regexFile=/etc/pihole/regex.list
  34. + IPV4_ADDRESS=
  35. + IPV6_ADDRESS=
  36. + QUERY_LOGGING=true
  37. + INSTALL_WEB_INTERFACE=true
  38. + PRIVACY_LEVEL=0
  39. + '[' -z root ']'
  40. ++ stty size
  41. + screen_size='24 80'
  42. + printf -v rows %d 24
  43. + printf -v columns %d 80
  44. + r=12
  45. + c=40
  46. + r=20
  47. + c=70
  48. + skipSpaceCheck=false
  49. + reconfigure=false
  50. + runUnattended=false
  51. + INSTALL_WEB_SERVER=true
  52. + [[ -f /opt/pihole/COL_TABLE ]]
  53. + COL_NC='\e[0m'
  54. + COL_LIGHT_GREEN='\e[1;32m'
  55. + COL_LIGHT_RED='\e[1;31m'
  56. + TICK='[\e[1;32mβœ“\e[0m]'
  57. + CROSS='[\e[1;31mβœ—\e[0m]'
  58. + INFO='[i]'
  59. + DONE='\e[1;32m done!\e[0m'
  60. + OVER='\r\033[K'
  61. + binary=tbd
  62. + counter=0
  63. + [[ '' != true ]]
  64. + main
  65. + local 'str=Root user check'
  66. + printf '\n'
  67.  
  68. + [[ 0 -eq 0 ]]
  69. + printf '  %b %s\n' '[\e[1;32mβœ“\e[0m]' 'Root user check'
  70.   [βœ“] Root user check
  71. + show_ascii_berry
  72. + echo -e '
  73.         \e[1;32m.;;,.
  74.         .ccccc:,.
  75.          :cccclll:.      ..,,
  76.           :ccccclll.   ;ooodc
  77.            '\''ccll:;ll .oooodc
  78.              .;cll.;;looo:.
  79.                  \e[1;31m.. '\'','\''.
  80.                 .'\'',,,,,,'\''.
  81.               .'\'',,,,,,,,,,.
  82.             .'\'',,,,,,,,,,,,....
  83.           ....'\'''\'''\'',,,,,,,'\''.......
  84.         .........  ....  .........
  85.         ..........      ..........
  86.         ..........      ..........
  87.         .........  ....  .........
  88.           ........,,,,,,,'\''......
  89.             ....'\'',,,,,,,,,,,,.
  90.                .'\'',,,,,,,,,'\''.
  91.                 .'\'',,,,,,'\''.
  92.                   ..'\'''\'''\''.\e[0m
  93. '
  94.  
  95.         .;;,.
  96.         .ccccc:,.
  97.          :cccclll:.      ..,,
  98.           :ccccclll.   ;ooodc
  99.            'ccll:;ll .oooodc
  100.              .;cll.;;looo:.
  101.                  .. ','.
  102.                 .',,,,,,'.
  103.               .',,,,,,,,,,.
  104.             .',,,,,,,,,,,,....
  105.           ....''',,,,,,,'.......
  106.         .........  ....  .........
  107.         ..........      ..........
  108.         ..........      ..........
  109.         .........  ....  .........
  110.           ........,,,,,,,'......
  111.             ....',,,,,,,,,,,,.
  112.                .',,,,,,,,,'.
  113.                 .',,,,,,'.
  114.                   ..'''.
  115.  
  116. + make_temporary_log
  117. ++ mktemp /tmp/pihole_temp.XXXXXX
  118. + TEMPLOG=/tmp/pihole_temp.3maWop
  119. + exec
  120. + rm /tmp/pihole_temp.3maWop
  121. + distro_check
  122. + is_command apt-get
  123. + local check_command=apt-get
  124. + command -v apt-get
  125. + PKG_MANAGER=apt-get
  126. + UPDATE_PKG_CACHE='apt-get update'
  127. + PKG_INSTALL=(${PKG_MANAGER} --yes --no-install-recommends install)
  128. + PKG_COUNT='apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
  129. + APT_SOURCES=/etc/apt/sources.list
  130. + awk 'BEGIN{a=1;b=0}/bionic main/{a=0}/bionic.*universe/{b=1}END{exit a + b}' /etc/apt/sources.list
  131. + apt-get install --dry-run iproute2
  132. + iproute_pkg=iproute2
  133. + is_command php
  134. + local check_command=php
  135. + command -v php
  136. + [[ '' != true ]]
  137. + apt-get install --dry-run php
  138. + phpVer=php
  139. + apt-get install --dry-run php-sqlite3
  140. + phpSqlite=sqlite3
  141. + INSTALLER_DEPS=(apt-utils dialog debconf dhcpcd5 git ${iproute_pkg} whiptail)
  142. + PIHOLE_DEPS=(cron curl dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data resolvconf libcap2)
  143. + PIHOLE_WEB_DEPS=(lighttpd ${phpVer}-common ${phpVer}-cgi ${phpVer}-${phpSqlite})
  144. + LIGHTTPD_USER=www-data
  145. + LIGHTTPD_GROUP=www-data
  146. + LIGHTTPD_CFG=lighttpd.conf.debian
  147. + [[ -f /etc/pihole/setupVars.conf ]]
  148. + [[ false == true ]]
  149. + verifyFreeDiskSpace
  150. + local 'str=Disk space check'
  151. + local required_free_kilobytes=51200
  152. + local existing_free_kilobytes
  153. ++ df -Pk
  154. ++ grep -m1 '\/$'
  155. ++ awk '{print $4}'
  156. + existing_free_kilobytes=111728648
  157. + [[ 111728648 =~ ^([0-9])+$ ]]
  158. + [[ 111728648 -lt 51200 ]]
  159. + printf '  %b %s\n' '[\e[1;32mβœ“\e[0m]' 'Disk space check'
  160.   [βœ“] Disk space check
  161. + update_package_cache
  162. + local 'str=Update local cache of available packages'
  163. + printf '  %b %s...' '[i]' 'Update local cache of available packages'
  164.   [i] Update local cache of available packages...+ eval 'apt-get update'
  165. + printf '%b  %b %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' 'Update local cache of available packages'
  166.   [βœ“] Update local cache of available packages
  167. + notify_package_updates_available
  168. + local 'str=Checking apt-get for upgraded packages'
  169. + printf '\n  %b %s...' '[i]' 'Checking apt-get for upgraded packages'
  170.  
  171.   [i] Checking apt-get for upgraded packages...++ eval 'apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true'
  172. +++ apt-get -s -o Debug::NoLocking=true upgrade
  173. +++ grep -c '^Inst'
  174. +++ true
  175. + updatesToInstall=0
  176. ++ uname -r
  177. + [[ -d /lib/modules/4.14.98-v7+ ]]
  178. + [[ 0 -eq 0 ]]
  179. + printf '%b  %b %s... up to date!\n\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' 'Checking apt-get for upgraded packages'
  180.   [βœ“] Checking apt-get for upgraded packages... up to date!
  181.  
  182. + install_dependent_packages 'INSTALLER_DEPS[@]'
  183. + counter=1
  184. + [[ 1 == 1 ]]
  185. + printf '  %b Installer Dependency checks...\n' '[i]'
  186.   [i] Installer Dependency checks...
  187. + argArray1=("${!1}")
  188. + declare -a argArray1
  189. + declare -a installArray
  190. + is_command debconf-apt-progress
  191. + local check_command=debconf-apt-progress
  192. + command -v debconf-apt-progress
  193. + for i in "${argArray1[@]}"
  194. + printf '  %b Checking for %s...' '[i]' apt-utils
  195.   [i] Checking for apt-utils...+ dpkg-query -W '-f=${Status}' apt-utils
  196. + grep 'ok installed'
  197. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' apt-utils
  198.   [βœ“] Checking for apt-utils
  199. + for i in "${argArray1[@]}"
  200. + printf '  %b Checking for %s...' '[i]' dialog
  201.   [i] Checking for dialog...+ dpkg-query -W '-f=${Status}' dialog
  202. + grep 'ok installed'
  203. + echo -e '\r\033[K  [i] Checking for dialog (will be installed)'
  204.   [i] Checking for dialog (will be installed)
  205. + installArray+=("${i}")
  206. + for i in "${argArray1[@]}"
  207. + printf '  %b Checking for %s...' '[i]' debconf
  208.   [i] Checking for debconf...+ dpkg-query -W '-f=${Status}' debconf
  209. + grep 'ok installed'
  210. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' debconf
  211.   [βœ“] Checking for debconf
  212. + for i in "${argArray1[@]}"
  213. + printf '  %b Checking for %s...' '[i]' dhcpcd5
  214.   [i] Checking for dhcpcd5...+ dpkg-query -W '-f=${Status}' dhcpcd5
  215. + grep 'ok installed'
  216. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' dhcpcd5
  217.   [βœ“] Checking for dhcpcd5
  218. + for i in "${argArray1[@]}"
  219. + printf '  %b Checking for %s...' '[i]' git
  220.   [i] Checking for git...+ dpkg-query -W '-f=${Status}' git
  221. + grep 'ok installed'
  222. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' git
  223.   [βœ“] Checking for git
  224. + for i in "${argArray1[@]}"
  225. + printf '  %b Checking for %s...' '[i]' iproute2
  226.   [i] Checking for iproute2...+ dpkg-query -W '-f=${Status}' iproute2
  227. + grep 'ok installed'
  228. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' iproute2
  229.   [βœ“] Checking for iproute2
  230. + for i in "${argArray1[@]}"
  231. + printf '  %b Checking for %s...' '[i]' whiptail
  232.   [i] Checking for whiptail...+ dpkg-query -W '-f=${Status}' whiptail
  233. + grep 'ok installed'
  234. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' whiptail
  235.   [βœ“] Checking for whiptail
  236. + [[ 1 -gt 0 ]]
  237. + test_dpkg_lock
  238. + i=0
  239. + fuser /var/lib/dpkg/lock
  240. + return 0
  241. + debconf-apt-progress -- apt-get --yes --no-install-recommends install dialog
  242. + return
  243. + checkSelinux
  244. + is_command getenforce
  245. + local check_command=getenforce
  246. + command -v getenforce
  247. + [[ false == false ]]
  248. + welcomeDialogs
  249. + whiptail --msgbox --backtitle Welcome --title 'Pi-hole automated installer' '\n\nThis installer will transform your device into a network-wide ad blocker!' 20 70
  250. + 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
  251. + 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.
  252.  
  253. In the next section, you can choose to use your current network settings (DHCP) or to manually edit them.' 20 70
  254. + mkdir -p /etc/pihole/
  255. + get_available_interfaces
  256. ++ ip --oneline link show up
  257. ++ grep -v lo
  258. ++ awk '{print $2}'
  259. ++ cut -d: -f1
  260. ++ cut -d@ -f1
  261. + availableInterfaces='eth0
  262. wlan0'
  263. + chooseInterface
  264. + interfacesArray=()
  265. + local interfacesArray
  266. + local interfaceCount
  267. + local chooseInterfaceCmd
  268. + local chooseInterfaceOptions
  269. + local firstLoop=1
  270. ++ wc -l
  271. + interfaceCount=2
  272. + [[ 2 -eq 1 ]]
  273. + read -r line
  274. + mode=OFF
  275. + [[ 1 -eq 1 ]]
  276. + firstLoop=0
  277. + mode=ON
  278. + interfacesArray+=("${line}" "available" "${mode}")
  279. + read -r line
  280. + mode=OFF
  281. + [[ 0 -eq 1 ]]
  282. + interfacesArray+=("${line}" "available" "${mode}")
  283. + read -r line
  284. + chooseInterfaceCmd=(whiptail --separate-output --radiolist "Choose An Interface (press space to select)" ${r} ${c} ${interfaceCount})
  285. ++ whiptail --separate-output --radiolist 'Choose An Interface (press space to select)' 20 70 2 eth0 available ON wlan0 available OFF
  286. + chooseInterfaceOptions=eth0
  287. + for desiredInterface in ${chooseInterfaceOptions}
  288. + PIHOLE_INTERFACE=eth0
  289. + printf '  %b Using interface: %s\n' '[i]' eth0
  290.   [i] Using interface: eth0
  291. + setDNS
  292. + local DNSSettingsCorrect
  293. + DNSChooseOptions=(Google "" OpenDNS "" Level3 "" Comodo "" DNSWatch "" Quad9 "" FamilyShield "" Cloudflare "" Custom "")
  294. ++ 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 ''
  295. + DNSchoices=Google
  296. + printf '  %b Using ' '[i]'
  297.   [i] Using + case ${DNSchoices} in
  298. + printf 'Google DNS servers\n'
  299. Google DNS servers
  300. + PIHOLE_DNS_1=8.8.8.8
  301. + PIHOLE_DNS_2=8.8.4.4
  302. + chooseBlocklists
  303. + [[ -f /etc/pihole/adlists.list ]]
  304. + 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)
  305. + 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)
  306. ++ 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
  307. + choices='StevenBlack
  308. MalwareDom
  309. Cameleon
  310. ZeusTracker
  311. DisconTrack
  312. DisconAd
  313. HostsFile'
  314. + for choice in ${choices}
  315. + appendToListsFile StevenBlack
  316. + case $1 in
  317. + echo https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
  318. + for choice in ${choices}
  319. + appendToListsFile MalwareDom
  320. + case $1 in
  321. + echo https://mirror1.malwaredomains.com/files/justdomains
  322. + for choice in ${choices}
  323. + appendToListsFile Cameleon
  324. + case $1 in
  325. + echo http://sysctl.org/cameleon/hosts
  326. + for choice in ${choices}
  327. + appendToListsFile ZeusTracker
  328. + case $1 in
  329. + echo 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist'
  330. + for choice in ${choices}
  331. + appendToListsFile DisconTrack
  332. + case $1 in
  333. + echo https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
  334. + for choice in ${choices}
  335. + appendToListsFile DisconAd
  336. + case $1 in
  337. + echo https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
  338. + for choice in ${choices}
  339. + appendToListsFile HostsFile
  340. + case $1 in
  341. + echo https://hosts-file.net/ad_servers.txt
  342. + use4andor6
  343. + local useIPv4
  344. + local useIPv6
  345. + cmd=(whiptail --separate-output --checklist "Select Protocols (press space to select)" ${r} ${c} 2)
  346. + options=(IPv4 "Block ads over IPv4" on IPv6 "Block ads over IPv6" on)
  347. ++ 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
  348. + choices=IPv4
  349. + for choice in ${choices}
  350. + case ${choice} in
  351. + useIPv4=true
  352. + [[ -n true ]]
  353. + find_IPv4_information
  354. + local route
  355. + local IPv4bare
  356. ++ ip route get 8.8.8.8
  357. + route='8.8.8.8 via 10.149.0.1 dev eth0 src 10.149.0.14
  358.     cache '
  359. ++ printf 10.149.0.14 cache
  360. + printf -v IPv4bare 10.149.0.14
  361. ++ printf 10.149.0.1 dev eth0 src 10.149.0.14 cache
  362. + printf -v IPv4gw 10.149.0.1
  363. + valid_ip 10.149.0.14
  364. + local ip=10.149.0.14
  365. + local stat=1
  366. + [[ 10.149.0.14 =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]
  367. + OIFS='    
  368. '
  369. + IFS=.
  370. + ip=(${ip})
  371. + IFS='    
  372. '
  373. + [[ 10 -le 255 ]]
  374. + [[ 149 -le 255 ]]
  375. + [[ 0 -le 255 ]]
  376. + [[ 14 -le 255 ]]
  377. + stat=0
  378. + return 0
  379. ++ ip -oneline -family inet address show
  380. ++ awk '{print $4}'
  381. ++ awk 'END {print}'
  382. ++ grep 10.149.0.14
  383. + IPV4_ADDRESS=10.149.0.14/16
  384. + getStaticIPv4Settings
  385. + local ipSettingsCorrect
  386. + whiptail --backtitle 'Calibrating network interface' --title 'Static IP Address' --yesno 'Do you want to use your current network settings as a static address?
  387.           IP address:    10.149.0.14/16
  388.           Gateway:       10.149.0.1' 20 70
  389. + 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.
  390. If you are worried, either manually set the address, or modify the DHCP reservation pool so it does not include the IP you want.
  391. 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
  392. + setStaticIPv4
  393. + local IFCFG_FILE
  394. + local CONNECTION_NAME
  395. + [[ -f /etc/dhcpcd.conf ]]
  396. + setDHCPCD
  397. + grep -q 10.149.0.14/16 /etc/dhcpcd.conf
  398. + echo 'interface eth0
  399.         static ip_address=10.149.0.14/16
  400.         static routers=10.149.0.1
  401.         static domain_name_servers=127.0.0.1'
  402. + tee -a /etc/dhcpcd.conf
  403. + ip addr replace dev eth0 10.149.0.14/16
  404. + 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
  405.   [βœ“] Set IP address to 10.149.0.14
  406.   You may need to restart after the install is complete
  407. + return 0
  408. + [[ -n '' ]]
  409. + printf '  %b IPv4 address: %s\n' '[i]' 10.149.0.14/16
  410.   [i] IPv4 address: 10.149.0.14/16
  411. + printf '  %b IPv6 address: %s\n' '[i]' ''
  412.   [i] IPv6 address:
  413. + [[ ! -n true ]]
  414. + setAdminFlag
  415. + local WebToggleCommand
  416. + local WebChooseOptions
  417. + local WebChoices
  418. + WebToggleCommand=(whiptail --separate-output --radiolist "Do you wish to install the web admin interface?" ${r} ${c} 6)
  419. + WebChooseOptions=("On (Recommended)" "" on Off "" off)
  420. ++ whiptail --separate-output --radiolist 'Do you wish to install the web admin interface?' 20 70 6 'On (Recommended)' '' on Off '' off
  421. + WebChoices='On (Recommended)'
  422. + case ${WebChoices} in
  423. + printf '  %b Web Interface On\n' '[i]'
  424.   [i] Web Interface On
  425. + INSTALL_WEB_INTERFACE=true
  426. + [[ true == true ]]
  427. + 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)
  428. + WebChooseOptions=("On (Recommended)" "" on Off "" off)
  429. ++ 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
  430. + WebChoices='On (Recommended)'
  431. + case ${WebChoices} in
  432. + printf '  %b Web Server On\n' '[i]'
  433.   [i] Web Server On
  434. + INSTALL_WEB_SERVER=true
  435. + setLogging
  436. + local LogToggleCommand
  437. + local LogChooseOptions
  438. + local LogChoices
  439. + LogToggleCommand=(whiptail --separate-output --radiolist "Do you want to log queries?" "${r}" "${c}" 6)
  440. + LogChooseOptions=("On (Recommended)" "" on Off "" off)
  441. ++ whiptail --separate-output --radiolist 'Do you want to log queries?' 20 70 6 'On (Recommended)' '' on Off '' off
  442. + LogChoices='On (Recommended)'
  443. + case ${LogChoices} in
  444. + printf '  %b Logging On.\n' '[i]'
  445.   [i] Logging On.
  446. + QUERY_LOGGING=true
  447. + setPrivacyLevel
  448. + local LevelCommand
  449. + local LevelOptions
  450. + LevelCommand=(whiptail --separate-output --radiolist "Select a privacy mode for FTL." "${r}" "${c}" 6)
  451. + LevelOptions=("0" "Show everything" on "1" "Hide domains" off "2" "Hide domains and clients" off "3" "Anonymous mode" off "4" "Disabled statistics" off)
  452. ++ 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
  453. + PRIVACY_LEVEL=0
  454. + printf '  %b Privacy level %d' '[i]' 0
  455.   [i] Privacy level 0+ clone_or_update_repos
  456. + [[ false == true ]]
  457. + getGitFiles /etc/.pihole https://github.com/pi-hole/pi-hole.git
  458. + local directory=/etc/.pihole
  459. + local remoteRepo=https://github.com/pi-hole/pi-hole.git
  460. + local 'str=Check for existing repository in /etc/.pihole'
  461. + printf '  %b %s...' '[i]' 'Check for existing repository in /etc/.pihole'
  462.   [i] Check for existing repository in /etc/.pihole...+ is_repo /etc/.pihole
  463. + local directory=/etc/.pihole
  464. + local curdir
  465. + local rc
  466. + curdir=/home/pi
  467. + [[ -d /etc/.pihole ]]
  468. + rc=1
  469. + cd /home/pi
  470. + return 1
  471. + printf '%b  %b %s\n' '\r\033[K' '[\e[1;31mβœ—\e[0m]' 'Check for existing repository in /etc/.pihole'
  472.   [βœ—] Check for existing repository in /etc/.pihole
  473. + make_repo /etc/.pihole https://github.com/pi-hole/pi-hole.git
  474. + local directory=/etc/.pihole
  475. + local remoteRepo=https://github.com/pi-hole/pi-hole.git
  476. + str='Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole'
  477. + printf '  %b %s...' '[i]' 'Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole'
  478.   [i] Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole...+ [[ -d /etc/.pihole ]]
  479. + git clone -q --depth 1 https://github.com/pi-hole/pi-hole.git /etc/.pihole
  480. + 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'
  481.   [βœ“] Clone https://github.com/pi-hole/pi-hole.git into /etc/.pihole
  482. + return 0
  483. + echo ''
  484.  
  485. + return 0
  486. + [[ true == true ]]
  487. + getGitFiles /var/www/html/admin https://github.com/pi-hole/AdminLTE.git
  488. + local directory=/var/www/html/admin
  489. + local remoteRepo=https://github.com/pi-hole/AdminLTE.git
  490. + local 'str=Check for existing repository in /var/www/html/admin'
  491. + printf '  %b %s...' '[i]' 'Check for existing repository in /var/www/html/admin'
  492.   [i] Check for existing repository in /var/www/html/admin...+ is_repo /var/www/html/admin
  493. + local directory=/var/www/html/admin
  494. + local curdir
  495. + local rc
  496. + curdir=/home/pi
  497. + [[ -d /var/www/html/admin ]]
  498. + rc=1
  499. + cd /home/pi
  500. + return 1
  501. + printf '%b  %b %s\n' '\r\033[K' '[\e[1;31mβœ—\e[0m]' 'Check for existing repository in /var/www/html/admin'
  502.   [βœ—] Check for existing repository in /var/www/html/admin
  503. + make_repo /var/www/html/admin https://github.com/pi-hole/AdminLTE.git
  504. + local directory=/var/www/html/admin
  505. + local remoteRepo=https://github.com/pi-hole/AdminLTE.git
  506. + str='Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin'
  507. + printf '  %b %s...' '[i]' 'Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin'
  508.   [i] Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin...+ [[ -d /var/www/html/admin ]]
  509. + git clone -q --depth 1 https://github.com/pi-hole/AdminLTE.git /var/www/html/admin
  510. + 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'
  511.   [βœ“] Clone https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin
  512. + return 0
  513. + echo ''
  514.  
  515. + return 0
  516. + dep_install_list=("${PIHOLE_DEPS[@]}")
  517. + local dep_install_list
  518. + [[ true == true ]]
  519. + dep_install_list+=("${PIHOLE_WEB_DEPS[@]}")
  520. + install_dependent_packages 'dep_install_list[@]'
  521. + counter=2
  522. + [[ 2 == 1 ]]
  523. + printf '  %b Main Dependency checks...\n' '[i]'
  524.   [i] Main Dependency checks...
  525. + argArray1=("${!1}")
  526. + declare -a argArray1
  527. + declare -a installArray
  528. + is_command debconf-apt-progress
  529. + local check_command=debconf-apt-progress
  530. + command -v debconf-apt-progress
  531. + for i in "${argArray1[@]}"
  532. + printf '  %b Checking for %s...' '[i]' cron
  533.   [i] Checking for cron...+ dpkg-query -W '-f=${Status}' cron
  534. + grep 'ok installed'
  535. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' cron
  536.   [βœ“] Checking for cron
  537. + for i in "${argArray1[@]}"
  538. + printf '  %b Checking for %s...' '[i]' curl
  539.   [i] Checking for curl...+ dpkg-query -W '-f=${Status}' curl
  540. + grep 'ok installed'
  541. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' curl
  542.   [βœ“] Checking for curl
  543. + for i in "${argArray1[@]}"
  544. + printf '  %b Checking for %s...' '[i]' dnsutils
  545.   [i] Checking for dnsutils...+ dpkg-query -W '-f=${Status}' dnsutils
  546. + grep 'ok installed'
  547. + echo -e '\r\033[K  [i] Checking for dnsutils (will be installed)'
  548.   [i] Checking for dnsutils (will be installed)
  549. + installArray+=("${i}")
  550. + for i in "${argArray1[@]}"
  551. + printf '  %b Checking for %s...' '[i]' iputils-ping
  552.   [i] Checking for iputils-ping...+ dpkg-query -W '-f=${Status}' iputils-ping
  553. + grep 'ok installed'
  554. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' iputils-ping
  555.   [βœ“] Checking for iputils-ping
  556. + for i in "${argArray1[@]}"
  557. + printf '  %b Checking for %s...' '[i]' lsof
  558.   [i] Checking for lsof...+ dpkg-query -W '-f=${Status}' lsof
  559. + grep 'ok installed'
  560. + echo -e '\r\033[K  [i] Checking for lsof (will be installed)'
  561.   [i] Checking for lsof (will be installed)
  562. + installArray+=("${i}")
  563. + for i in "${argArray1[@]}"
  564. + printf '  %b Checking for %s...' '[i]' netcat
  565.   [i] Checking for netcat...+ dpkg-query -W '-f=${Status}' netcat
  566. + grep 'ok installed'
  567. + echo -e '\r\033[K  [i] Checking for netcat (will be installed)'
  568.   [i] Checking for netcat (will be installed)
  569. + installArray+=("${i}")
  570. + for i in "${argArray1[@]}"
  571. + printf '  %b Checking for %s...' '[i]' psmisc
  572.   [i] Checking for psmisc...+ dpkg-query -W '-f=${Status}' psmisc
  573. + grep 'ok installed'
  574. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' psmisc
  575.   [βœ“] Checking for psmisc
  576. + for i in "${argArray1[@]}"
  577. + printf '  %b Checking for %s...' '[i]' sudo
  578.   [i] Checking for sudo...+ dpkg-query -W '-f=${Status}' sudo
  579. + grep 'ok installed'
  580. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' sudo
  581.   [βœ“] Checking for sudo
  582. + for i in "${argArray1[@]}"
  583. + printf '  %b Checking for %s...' '[i]' unzip
  584.   [i] Checking for unzip...+ dpkg-query -W '-f=${Status}' unzip
  585. + grep 'ok installed'
  586. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' unzip
  587.   [βœ“] Checking for unzip
  588. + for i in "${argArray1[@]}"
  589. + printf '  %b Checking for %s...' '[i]' wget
  590.   [i] Checking for wget...+ dpkg-query -W '-f=${Status}' wget
  591. + grep 'ok installed'
  592. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' wget
  593.   [βœ“] Checking for wget
  594. + for i in "${argArray1[@]}"
  595. + printf '  %b Checking for %s...' '[i]' idn2
  596.   [i] Checking for idn2...+ dpkg-query -W '-f=${Status}' idn2
  597. + grep 'ok installed'
  598. + echo -e '\r\033[K  [i] Checking for idn2 (will be installed)'
  599.   [i] Checking for idn2 (will be installed)
  600. + installArray+=("${i}")
  601. + for i in "${argArray1[@]}"
  602. + printf '  %b Checking for %s...' '[i]' sqlite3
  603.   [i] Checking for sqlite3...+ dpkg-query -W '-f=${Status}' sqlite3
  604. + grep 'ok installed'
  605. + echo -e '\r\033[K  [i] Checking for sqlite3 (will be installed)'
  606.   [i] Checking for sqlite3 (will be installed)
  607. + installArray+=("${i}")
  608. + for i in "${argArray1[@]}"
  609. + printf '  %b Checking for %s...' '[i]' libcap2-bin
  610.   [i] Checking for libcap2-bin...+ dpkg-query -W '-f=${Status}' libcap2-bin
  611. + grep 'ok installed'
  612. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' libcap2-bin
  613.   [βœ“] Checking for libcap2-bin
  614. + for i in "${argArray1[@]}"
  615. + printf '  %b Checking for %s...' '[i]' dns-root-data
  616.   [i] Checking for dns-root-data...+ dpkg-query -W '-f=${Status}' dns-root-data
  617. + grep 'ok installed'
  618. + echo -e '\r\033[K  [i] Checking for dns-root-data (will be installed)'
  619.   [i] Checking for dns-root-data (will be installed)
  620. + installArray+=("${i}")
  621. + for i in "${argArray1[@]}"
  622. + printf '  %b Checking for %s...' '[i]' resolvconf
  623.   [i] Checking for resolvconf...+ dpkg-query -W '-f=${Status}' resolvconf
  624. + grep 'ok installed'
  625. + echo -e '\r\033[K  [i] Checking for resolvconf (will be installed)'
  626.   [i] Checking for resolvconf (will be installed)
  627. + installArray+=("${i}")
  628. + for i in "${argArray1[@]}"
  629. + printf '  %b Checking for %s...' '[i]' libcap2
  630.   [i] Checking for libcap2...+ dpkg-query -W '-f=${Status}' libcap2
  631. + grep 'ok installed'
  632. + printf '%b  %b Checking for %s\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' libcap2
  633.   [βœ“] Checking for libcap2
  634. + for i in "${argArray1[@]}"
  635. + printf '  %b Checking for %s...' '[i]' lighttpd
  636.   [i] Checking for lighttpd...+ dpkg-query -W '-f=${Status}' lighttpd
  637. + grep 'ok installed'
  638. + echo -e '\r\033[K  [i] Checking for lighttpd (will be installed)'
  639.   [i] Checking for lighttpd (will be installed)
  640. + installArray+=("${i}")
  641. + for i in "${argArray1[@]}"
  642. + printf '  %b Checking for %s...' '[i]' php-common
  643.   [i] Checking for php-common...+ dpkg-query -W '-f=${Status}' php-common
  644. + grep 'ok installed'
  645. + echo -e '\r\033[K  [i] Checking for php-common (will be installed)'
  646.   [i] Checking for php-common (will be installed)
  647. + installArray+=("${i}")
  648. + for i in "${argArray1[@]}"
  649. + printf '  %b Checking for %s...' '[i]' php-cgi
  650.   [i] Checking for php-cgi...+ dpkg-query -W '-f=${Status}' php-cgi
  651. + grep 'ok installed'
  652. + echo -e '\r\033[K  [i] Checking for php-cgi (will be installed)'
  653.   [i] Checking for php-cgi (will be installed)
  654. + installArray+=("${i}")
  655. + for i in "${argArray1[@]}"
  656. + printf '  %b Checking for %s...' '[i]' php-sqlite3
  657.   [i] Checking for php-sqlite3...+ dpkg-query -W '-f=${Status}' php-sqlite3
  658. + grep 'ok installed'
  659. + echo -e '\r\033[K  [i] Checking for php-sqlite3 (will be installed)'
  660.   [i] Checking for php-sqlite3 (will be installed)
  661. + installArray+=("${i}")
  662. + [[ 11 -gt 0 ]]
  663. + test_dpkg_lock
  664. + i=0
  665. + fuser /var/lib/dpkg/lock
  666. + return 0
  667. + 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
  668. + return
  669. + unset dep_install_list
  670. + [[ true == true ]]
  671. + enable_service lighttpd
  672. + local 'str=Enabling lighttpd service to start on reboot'
  673. + printf '  %b %s...' '[i]' 'Enabling lighttpd service to start on reboot'
  674.   [i] Enabling lighttpd service to start on reboot...+ is_command systemctl
  675. + local check_command=systemctl
  676. + command -v systemctl
  677. + systemctl enable lighttpd
  678. + printf '%b  %b %s...\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]' 'Enabling lighttpd service to start on reboot'
  679.   [βœ“] Enabling lighttpd service to start on reboot...
  680. + check_service_active lighttpd
  681. + is_command systemctl
  682. + local check_command=systemctl
  683. + command -v systemctl
  684. + systemctl is-enabled lighttpd
  685. + LIGHTTPD_ENABLED=true
  686. + FTLdetect
  687. + printf '\n  %b FTL Checks...\n\n' '[i]'
  688.  
  689.   [i] FTL Checks...
  690.  
  691. + FTLcheckUpdate
  692. + get_binary_name
  693. + local machine
  694. ++ uname -m
  695. + machine=armv7l
  696. + local 'str=Detecting architecture'
  697. + printf '  %b %s...' '[i]' 'Detecting architecture'
  698.   [i] Detecting architecture...+ [[ armv7l == \a\r\m* ]]
  699. + local rev
  700. ++ uname -m
  701. ++ sed 's/[^0-9]//g;'
  702. + rev=7
  703. + local lib
  704. ++ ldd /bin/ls
  705. ++ grep -E '^\s*/lib'
  706. ++ awk '{ print $1 }'
  707. + lib=/lib/ld-linux-armhf.so.3
  708. + [[ /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 ]]
  709. + [[ /lib/ld-linux-armhf.so.3 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\r\m\h\f\.\s\o\.\3 ]]
  710. + [[ 7 -gt 6 ]]
  711. + printf '%b  %b Detected ARM-hf architecture (armv7+)\n' '\r\033[K' '[\e[1;32mβœ“\e[0m]'
  712.   [βœ“] Detected ARM-hf architecture (armv7+)
  713. + binary=pihole-FTL-arm-linux-gnueabihf
  714. + printf '  %b Checking for existing FTL binary...\n' '[i]'
  715.   [i] Checking for existing FTL binary...
  716. + local ftlLoc
  717. ++ which pihole-FTL
  718. + ftlLoc=
  719. + local ftlBranch
  720. + [[ -f /etc/pihole/ftlbranch ]]
  721. + ftlBranch=master
  722. + local remoteSha1
  723. + local localSha1
  724. + which dnsmasq
  725. + [[ ! master == \m\a\s\t\e\r ]]
  726. + [[ -n '' ]]
  727. + return 0
  728. + FTLinstall
  729. + local latesttag
  730. + local 'str=Downloading and Installing FTL'
  731. + printf '  %b %s...' '[i]' 'Downloading and Installing FTL'
  732.   [i] Downloading and Installing FTL...++ curl -sI https://github.com/pi-hole/FTL/releases/latest
  733. ++ grep Location
  734. ++ awk -F / '{print $NF}'
  735. + latesttag=
  736. + [[ ! '' == v* ]]
  737. + printf '%b  %b %s\n' '\r\033[K' '[\e[1;31mβœ—\e[0m]' 'Downloading and Installing FTL'
  738.   [βœ—] Downloading and Installing FTL
  739. + printf '  %bError: Unable to get latest release location from GitHub%b\n' '\e[1;31m' '\e[0m'
  740.   Error: Unable to get latest release location from GitHub
  741. + return 1
  742. + return 1
  743. + printf '  %b FTL Engine not installed\n' '[\e[1;31mβœ—\e[0m]'
  744.   [βœ—] FTL Engine not installed
  745. + exit 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top