What's new

[Release] AB-Solution 3 - The Ad Blocking Solution

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
Thats for the logging only or for crontab as well?
How can I check that, because this might be the reason why 0 is no longer valid for Sun and it should be 1 (for the american system).
Any time you logon via telnet/ssh it will be there. AFAIK it will also be added to any child shells as well.
You could check for $TZ being null, but I think it shouldn't hurt if you re-export it.
 
That may very well work on your BHR, but I doubt privoxy or any other software can do that on a consumer router.

actually a solution like that, it's much more than a BHR - this is the same tech that is used by providers to do ad-insertion (along with other monetization items) helps to do DPI at a massive scale ;)
 
actually a solution like that, it's much more than a BHR - this is the same tech that is used by providers to do ad-insertion (along with other monetization items) helps to do DPI at a massive scale ;)
I'll visit with you next time I'm stateside, never been where you're at...
 
Any time you logon via telnet/ssh it will be there. AFAIK it will also be added to any child shells as well.
You could check for $TZ being null, but I think it shouldn't hurt if you re-export it.
So, best option for me is to add it in AB and and all the scripts where I use the date function or the saved variable value.
That's simple enough.
 
Sure - scary stuff is that techniques like this can be used for good or less than good...
lets be thankful this technique requires some heavy resources then.... but i guess i'll have to give up browsing the internet if someone develops a tiny-server-farm package for entware :eek:
 
So, best option for me is to add it in AB and and all the scripts where I use the date function or the saved variable value.
That's simple enough.
Wait, would that work? Cron triggers the job, but if it does not know what 0 stands for with a different TZ, it would fail.
Who made that date() change and why now?
 
lets be thankful this technique requires some heavy resources then.... but i guess i'll have to give up browsing the internet if someone develops a tiny-server-farm package for entware :eek:
An Asuswrt-Merlin cluster would work, have @ryzhov_al do the necessary packages. I have four routers to test it with.
 
Wait, would that work? Cron triggers the job, but if it does not know what 0 stands for with a different TZ, it would fail.
Who made that date() change and why now?
I added the export to address problems where people were using Entware packages and the syslog times reported by those packages was wrong. In some cases, there are time dependent processes and it can cause problems.
 
I added the export to address problems where people were using Entware packages and the syslog times reported by those packages was wrong. In some cases, there are time dependent processes and it can cause problems.
Which means it gets complicated for me. And I can't just drop Sunday, it's 0-6 or 1-7, depending on TZ.
Also, the update day is set before I add TZ when pixelserv gets installed. A lot to double check and change for me, a small change for you. Ah, well, I'll have to rethink how I do this.
 
Which means it gets complicated for me. And I can't just drop Sunday, it's 0-6 or 1-7, depending on TZ.
Also, the update day is set before I add TZ when pixelserv gets installed. A lot to double check and change for me, a small change for you. Ah, well, I'll have to rethink how I do this.
does it help if we restart the cron daemon after exporting the time zone?
 
does it help if we restart the cron daemon after exporting the time zone?
I don't know yet. But the update day is saved twice in the AB config file:
hostsFileUpdateDay="Friday"
dayOfWeek="5"
Now, which one is true? Friday for sure but how should I write the cron job, which can be either 0-6 or 1-7, depending when the week starts for that TZ.
And would crontab be set to the TZ as well or not?
Not very funny the whole thing.
 
I don't know yet. But the update day is saved twice in the AB config file:
hostsFileUpdateDay="Friday"
dayOfWeek="5"
Now, which one is true? Friday for sure but how should I write the cron job, which can be either 0-6 or 1-7, depending when the week starts for that TZ.
And would crontab be set to the TZ as well or not?
Not very funny the whole thing.
isn't 1 through 5 the same which ever way you do it?.... i thought it worked like this
0-6 is sunday through to friday
1-7 is monday through to saturday
 
isn't 1 through 5 the same which ever way you do it?.... i thought it worked like this
0-6 is sunday through to friday
1-7 is monday through to saturday
Which means either 0 or 7 is unknown to cron as a valid day.
 
Can't you just check the value of $TZ before you set the day?
How do I know cron will honor the TZ as well?
And if it is unset, it will be set when pixelserve is added as addon, but by that time the cron job and numerical day is set in AB. Hence my above words about having to double check and change dates afterwards.
 
@john9527 and @RMerlin: Would you agree with me, this is very inconvenient. What is the best way to handle this? The scripts, cron and shell input all run as user 'admin/root'?
From the crontab manpage:
LIMITATIONS
The cron daemon runs with a defined timezone. It currently does not
support per-user timezones. All the tasks: system's and user's will
be run based on the configured timezone. Even if a user specifies
the TZ environment variable in his crontab this will affect only
the commands executed in the crontab, not the execution of the crontab
tasks themselves.
 
If you are picking a single day, use the day name abbreviation instead of the number in the command? (Can't use names in lists or ranges).

BTW....it also says this

When specifying day of week, both day 0 and day 7 will be considered Sunday.
BSD and ATT seem to disagree about this.
 
Last edited:
But before you do anything at all, answer these, it provides info I'm eager to know:
- Enter cru l (lower case L) in a terminal and post output

00 5 * * 5 /tmp/mnt/usbstick/adblocking/addon/update-hosts.add cronjob #UpdateHosts#
20 5 * * * /tmp/mnt/usbstick/adblocking/addon/rotate-logs.add #RotateLogs#
30 4 * * 5 /tmp/mnt/usbstick/adblocking/scripts/weekly-log-stats.sh #WeeklyStats#

- What update day is set
Sunday 5.00 in the morning.

and what language is your router WebUI

English

- How much RAM is left
total used free shared buffers
Mem: 255700 148268 107432 0 1336
-/+ buffers: 146932 108768
Swap: 0 0 0

- Your router model
RT-AC87U running merlinwrt v380.63_2
 
Which means either 0 or 7 is unknown to cron as a valid day.
I doubt the timezone combined with language setting is causing problems to cron, as it would make the update cron script not run at all.

For me, the update obviously does run as scheduled at 5 each sunday morning, as I have no problems before that until afterwards as ABS stops working.

Edit: Strange, I ran the date command in shell and it says I'm in MET timezone, whatever that is. The timezone I set in the WebUI is GMT +1 Copenhagen, Stockholm, Oslo which is CET and not MET.
 
Status
Not open for further replies.

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top