Feature #3387
open
process_alias_urltable Frequency
Added by Shawn Bruce almost 11 years ago.
Updated over 5 years ago.
Category:
Aliases / Tables
Description
Currently the urltable design only allows for updates on a daily interval and is processed via crontab every 12 hours. It would be more beneficial to allow the user to decide on the update frequency in minutes instead.
Proposed changes:
1.)Change the frequency from a dropdown to a text field.
2.)Change current crontab to:
* * * * * root /usr/bin/nice -n20 /etc/rc.update_urltables
3.)Change process_alias_urltable() to use 60 instead of 86400 seconds ( After pending merge https://github.com/pfsense/pfsense/pull/876 )
Files
A code to upgrade current config to new format will be necessary too
I have created a diff for firewall_aliases_edit.php against the latest git version. Would this be acceptable?
I am not sure how #2 is handled as I only saw the crontab entry being populated from the /etc/inc/upgrade_config.inc file
Shawn Bruce wrote:
I have created a diff for firewall_aliases_edit.php against the latest git version. Would this be acceptable?
I am not sure how item 2 is handled as I only saw the crontab entry being populated from the /etc/inc/upgrade_config.inc file
Ah never mind. I forgot about the ability to change the type on the fly...
rc.update_urltables accepts the parameter argv1, and looks for the option now.
I've put in my crontab
* * * * * root /usr/bin/nice -n20 /etc/rc.update_urltables now
Then modified rc.update_urltables to made this change
foreach ($todo as $t) {
if( $argv[1] == "now" ) {
$t['freq']=0;
}
So while this works for me with the one update call I make to a script that monitors all my EC2 IPs..
This solves my issue for now, but I think it would definitely make more sense to have freq be able to accept minutes rather then days.
- Category changed from Rules / NAT to Aliases / Tables
Also available in: Atom
PDF