Skip to content

pbr-1.2.4: add a dnsprefetch service command for cron - #210

Open
pesa1234 wants to merge 1 commit into
mossdef-org:1.2.4from
pesa1234:dnsprefetch-command
Open

pesa1234 wants to merge 1 commit into
mossdef-org:1.2.4from
pesa1234:dnsprefetch-command

Conversation

@pesa1234

Copy link
Copy Markdown
Contributor

Add '/etc/init.d/pbr dnsprefetch', which runs the file in standalone mode, and a dnsprefetch_flush_sets option in the config section that turns the flush on. A nightly rebuild then takes:

uci set pbr.config.dnsprefetch_flush_sets='1'
uci commit pbr
0 4 * * * /etc/init.d/pbr dnsprefetch

Without the option a standalone run only tops up the sets, as before, and without the cron line nothing runs: the prefetch on start and reload is unchanged. Calling the file directly with PBR_DNSPREFETCH_MODE still works. tests/06_shell_wrapper/05_dnsprefetch_command.sh covers the command.

Rebuilding the domain sets from cron needs two settings today: the
PBR_DNSPREFETCH_MODE=standalone variable in the cron line, and
_dnsprefetch_flush_sets='1' edited into pbr.user.dnsprefetch. The second
does not survive an upgrade, because the file is not a conffile.

Add '/etc/init.d/pbr dnsprefetch', which runs the file in standalone
mode, and a dnsprefetch_flush_sets option in the config section that
turns the flush on. A nightly rebuild then takes:

  uci set pbr.config.dnsprefetch_flush_sets='1'; uci commit pbr
  0 4 * * * /etc/init.d/pbr dnsprefetch

Without the option a standalone run only tops up the sets, as before,
and without the cron line nothing runs: the prefetch on start and reload
is unchanged. Calling the file directly with PBR_DNSPREFETCH_MODE still
works. tests/06_shell_wrapper/05_dnsprefetch_command.sh covers the
command.

Signed-off-by: Andrea Pesaresi <andreapesaresi82@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant