Project

General

Profile

Actions

Feature #3387

open

process_alias_urltable Frequency

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

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

0%

Estimated time:
Plus Target Version:
Release Notes:

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

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
Actions #1

Updated by Renato Botelho over 10 years ago

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

Actions #2

Updated by Shawn Bruce over 10 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

Actions #3

Updated by Shawn Bruce over 10 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

Actions #4

Updated by Shawn Bruce over 10 years ago

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

Actions #5

Updated by Dave Minogue about 9 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.

Actions #6

Updated by Jim Pingle over 4 years ago

  • Category changed from Rules / NAT to Aliases / Tables
Actions

Also available in: Atom PDF