Project

General

Profile

Feature #3387

process_alias_urltable Frequency

Added by Shawn Bruce over 5 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Rules/NAT
Target version:
-
Start date:
01/06/2014
Due date:
% Done:

0%

Estimated time:

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 )

urltable_freq.diff (1.27 KB) urltable_freq.diff firewall_aliases_edit.php with update freq as text field Shawn Bruce, 01/07/2014 04:11 PM

History

#1 Updated by Renato Botelho over 5 years ago

A code to upgrade current config to new format will be necessary too

#2 Updated by Shawn Bruce over 5 years ago

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

#3 Updated by Shawn Bruce over 5 years ago

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

#4 Updated by Shawn Bruce over 5 years ago

Ah never mind. I forgot about the ability to change the type on the fly...

#5 Updated by Dave Minogue over 4 years ago

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.

Also available in: Atom PDF