Not working for me
Hey guys, so i'm trying to set up adblocking on my N66U but it's not working for me i followed the first post and for me everything seems to be setup in the right way. maybe someone can help me. i tested if it's working by just calling some of the urls in the hosts.clean file in my browser, and all of them were working so something is going on

- also thepiratebay is plasterd with ads...
Here are my scripts:
/jffs/scripts/post-mount:
Code:
#!/bin/sh
if [ $1 = "/tmp/mnt/sda1" ]
then
# Entware setup
ln -sf $1/entware /tmp/opt
# Entware services. Do NOT use services-start for this bec usb may not be ready
if [ -x /opt/etc/init.d/rc.unslung ]
then
/usr/bin/logger -t $0 "Found rc.unslung; starting Entware services"
/opt/etc/init.d/rc.unslung start
/usr/bin/logger -t $0 "Entware services started"
else
/usr/bin/logger -t $0 "ERROR: - rc.unslung not found - Entware services NOT STARTED"
fi
fi
sleep 12
wget -qO- "http://winhelp2002.mvps.org/hosts.txt" "http://someonewhocares.org/hosts/zero/hosts" "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&startdate[day]=&startdate[month]=&startdate[year]=&mimetype=plaintext&useip=0.0.0.0" | grep -w ^0.0.0.0 | sed $'s/\r$//' | sort -u > /tmp/mnt/sda1/hosts.clean
sleep 5
service restart_dnsmasq
/jffs/configs/dnsmasq.conf.add
Code:
address=/0.0.0.0/0.0.0.0
addn-hosts=/tmp/mnt/sda1/hosts.clean
/jffs/scripts/update-hosts.sh
Code:
#!/bin/sh
wget -qO- "http://winhelp2002.mvps.org/hosts.txt" "http://someonewhocares.org/hosts/zero/hosts" "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&startdate[day]=&startdate[month]=&startdate[year]=&mimetype=plaintext&useip=0.0.0.0" | grep -w ^0.0.0.0 | sed $'s/\r$//' | sort -u > /tmp/mnt/sda1/hosts.clean
sleep 5
service restart_dnsmasq
I also created the init-start, but i have a question here, since this is just a cronjob, can i also add it to services-start instead of init-start, since i have some other working cronjobs there? I would think so, but tell me if i'm wrong on this!
All the files are executeable, when i manually start ./update-hosts.sh it's working, also in the syslog i can see that dnsmasq is reading the hosts-clean
Code:
dnsmasq[372]: read /tmp/mnt/sda1/hosts.clean - 23822 addresses
Jan 1 01:00:19 dnsmasq[372]: read /etc/hosts.dnsmasq - 6 addresses
Jan 1 01:00:19 dnsmasq-dhcp[372]: read /etc/ethers - 6 addresses
Jan 1 01:00:20 dnsmasq[372]: using local addresses only for domain blablabla......
The file permissions are also properly set...
Code:
-rwxrwxrwx 1 admin root 196 Sep 11 08:06 SpdnsUpdate.sh
-rwxrwxrwx 1 admin root 83 Sep 11 09:55 init-start
-rwxrwxrwx 1 admin root 55 Sep 10 22:14 ledsoff.sh
-rwxrwxrwx 1 admin root 55 Sep 10 22:14 ledson.sh
-rwxrwxrwx 1 admin root 866 Sep 11 09:50 post-mount
-rwxrwxrwx 1 admin root 232 Sep 11 09:54 services-start
-rwxrwxrwx 1 admin root 43 Sep 11 00:33 services-stop
-rwxrwxrwx 1 admin root 372 Sep 11 08:40 update-hosts.sh
I also did several reboots and also double and triple checked the code in the scripts (maybe i'm a bit blind from coding the last two days

). I hope somone can help me out
kind regards