Hi everyone,
I thought I'd see if anyone else had tried this or had any suggestions...
I checked out this script and knew no way I was going to try installing this on my primary Asus router....now running a "Kong" version of DD-WRT with lighttpd burned into the firmware and running dnsmasq, openvpn and a few other things quite well..
..so I installed it on my old Netgear R6300 that has the latest DD-WRT . I manually installed all the entware dependencies and had to create several folders and files where the script couldn't do it.
This is far more complicated than I thought....here's the script feedback:
Using username "root".
DD-WRT v3.0-r33772 giga (c) 2017 NewMedia-NET GmbH
Release: 11/16/17___ ___ _ _____ ______ ____ ___ / _ \/ _ \___| | /| / / _ \/_ __/ _ __|_ / / _ \/ // / // // |/ |/ / , / / / | |/ // </ // /
/// |/|//|| // |/()__/DD-WRT v3.0 http://www.dd-wrt.com==========================================================
BusyBox v1.27.2 (2017-11-16 14:19:52 CET) built-in shell (ash)
root@R6300:~# cd /opt/tmp
root@R6300:/opt/tmp# ls
pi-hole-for-asuswrt.sh
root@R6300:/opt/tmp# ./pi-hole-for-asuswrt.sh
::: Install PiHole!
:::
::: Options:
::: -i, install
::: -u, update
root@R6300:/opt/tmp# ./pi-hole-for-asuswrt.sh -i
./pi-hole-for-asuswrt.sh: line 405: installDependencies: not found
:::
::: Creating Bridge Interface
!!! done.
:::
::: Setup php.ini with correct TZ...
!!! done.
:::
::: Creating dnsmasq configuration
!!! done.
:::
::: Creating lighttpd configuration
Shutting down lighttpd... done.
Starting lighttpd... done.
!!! done.
:::
::: Checking for existing base files...
::: Checking /opt/etc/.pihole is a repo... OK!
::: Updating repo in /opt/etc/.pihole... done!
:::
::: Checking for existing web interface...
::: Checking /opt/etc/.pihole_admin is a repo... OK!
::: Updating repo in /opt/etc/.pihole_admin... done!
:::
::: Installing scripts to /opt/pihole...
sed: bad option in substitution expression
sed: bad option in substitution expression
sed: bad option in substitution expression
sed: bad option in substitution expression
sed: bad option in substitution expression
!!! done.
:::
::: Installing Admin to /opt/share/www/admin...find: unrecognized: -exec
find: unrecognized: -exec
sed: unsupported command |
!!! done.
:::
::: Installing pi-hole movie... done.
:::
::: Create PiHole Ip file...
!!! done.
:::
::: Create dummy Host file...
!!! done.
:::
::: Creating log file and changing owner to nobody... already exists!
:::
::: Installing pihole custom index page...
!!! done
:::
::: Installing Cron Jobs
!!! done.
:::
::: Preparing to run gravity.sh to refresh hosts...
::: Cleaning up previous install (preserving whitelist/blacklist)
::: Running gravity.sh
:::
::: Neutrino emissions detected...
:::
::: Pulling source lists into range... done!
:::
::: Getting raw.githubusercontent.com list... done
::: Status: Status 000
::: Download failed and no cached list available (list will not be considered)
::: Getting mirror1.malwaredomains.com list... done
::: Status: Status 000
::: Download failed and no cached list available (list will not be considered)
::: Getting sysctl.org list... done
::: Status: Success (OK)
::: List updated, transport successful!
::: Getting zeustracker.abuse.ch list... done
::: Status: Status 000
::: Download failed and no cached list available (list will not be considered)
::: Getting s3.amazonaws.com list... done
::: Status: Status 000
::: Download failed and no cached list available (list will not be considered)
::: Getting s3.amazonaws.com list... done
::: Status: Status 000
::: Download failed and no cached list available (list will not be considered)
::: Getting hosts-file.net list... done
::: Status: Status 000
::: Download failed and no cached list available (list will not be considered)
:::
::: Aggregating list of domains... done!
::: Formatting list of domains to remove comments.... done!
::: 20629 domains being pulled in by gravity...
::: Removing duplicate domains.... done!
::: 20629 unique domains trapped in the event horizon.
:::
::: Adding adlist sources to the whitelist... done!
/opt/pihole/gravity.sh: line 276: /usr/local/bin/pihole: No such file or directory
::: Nothing to whitelist!
::: Nothing to blacklist!
::: No wildcards used!
::: Formatting domains into a HOSTS file.../opt/pihole/gravity.sh: line 305: /opt/etc/pihole/pihole.2.supernova.txt: No such file or directory
::: Nothing to blacklist!
done!
:::
::: Cleaning up un-needed files... done!
:::
::: Refresh lists in dnsmasq.../opt/pihole/gravity.sh: line 405: /usr/local/bin/pihole: No such file or directory
done!
/opt/pihole/gravity.sh: line 459: /usr/local/bin/pihole: No such file or directory
::: View the web interface at http://pi.hole/admin or http:///admin
....and here's the admin page:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /opt/share/www/admin/scripts/pi-hole/php/header.php:8) in /opt/share/www/admin/scripts/pi-hole/php/password.php on line 10
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /opt/share/www/admin/scripts/pi-hole/php/header.php:8) in /opt/share/www/admin/scripts/pi-hole/php/password.php on line 10
Warning: parse_ini_file(/etc/pihole/setupVars.conf): failed to open stream: No such file or directory in /opt/share/www/admin/scripts/pi-hole/php/password.php on line 13
Warning: parse_ini_file(/etc/pihole/setupVars.conf): failed to open stream: No such file or directory in /opt/share/www/admin/scripts/pi-hole/php/auth.php on line 25
Fatal error: Uncaught Error: Call to undefined function sys_getloadavg() in /opt/share/www/admin/scripts/pi-hole/php/header.php:74 Stack trace: #0 /opt/share/www/admin/index.php(9): require() #1 {main} thrown in /opt/share/www/admin/scripts/pi-hole/php/header.php on line 74
Is there a problem with installing this as root? Everything needs to be written to /opt or /jffs mounted to the USB drive as the rest of the file-system is read-only....
Thanks
![]()