ZOzo
1
set these lines in a file, xecutable
executed good and working in terminal
but not as cron job
help needed
thx
rm /etc/localitems/AdvBlockHostList.txt
/usr/bin/wget -P /etc/localitems 'https://adaway.org/hosts.txt'
mv /etc/localitems/hosts.txt /etc/localitems/AdvBlockHostList.txt
cat /etc/localitems/myPrivateBlockList.txt | tee -a /etc/localitems/AdvBlockHostList.txt
/etc/init.d/dnsmasq restart
mk24
2
Do you have the #!/usr/bin/sh as the first line script?
What does not work about it? If it doesn't run at all, see above, also you could put something like
logger "Ad block list update running"
to generate log entries.
Instead of wget -P I'd use -O with a complete path and name to guarantee that the name of the file is as expected.
You should probably keep the list in /tmp rather than wearing out your flash. Add the script to /etc/rc.local so it reloads the list after a reboot.
4 Likes
slh
3
Rather #!/bin/sh
, the former would only be valid on post-usrmerge systems (OpenWrt has not done that so far).
2 Likes
ZOzo
4
Thx slh, thx Mike
your help + NTP server changed solve my issue. I think it was a time issue
tmomas
Closed
5
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.