Commit 0dd2c697 authored by Franco Fichtner's avatar Franco Fichtner

rfc2136: split relevant rc.dyndns.update parts in half #1478

Now the old manual cron job only updates DynDNS, but the autocron
will fix itself...  :)
parent 852261b6
...@@ -1588,8 +1588,9 @@ function system_cron_configure($verbose = false) ...@@ -1588,8 +1588,9 @@ function system_cron_configure($verbose = false)
/* daily */ /* daily */
$autocron[] = generate_cron_job('/usr/local/etc/rc.update_alias_url_data', '1', '1'); $autocron[] = generate_cron_job('/usr/local/etc/rc.update_alias_url_data', '1', '1');
$autocron[] = generate_cron_job('/usr/local/etc/rc.update_urltables', '5', '1'); $autocron[] = generate_cron_job('/usr/local/etc/rc.update_urltables', '6', '1');
$autocron[] = generate_cron_job('/usr/local/etc/rc.dyndns.update', '11', '1'); $autocron[] = generate_cron_job('/usr/local/etc/rc.dyndns.update', '11', '1');
$autocron[] = generate_cron_job('/usr/local/etc/rc.rfc2136.update', '16', '1');
/* every now and then */ /* every now and then */
$autocron[] = generate_cron_job('/usr/local/sbin/ping_hosts.sh', '*/4'); $autocron[] = generate_cron_job('/usr/local/sbin/ping_hosts.sh', '*/4');
......
...@@ -32,8 +32,7 @@ require_once("interfaces.inc"); ...@@ -32,8 +32,7 @@ require_once("interfaces.inc");
require_once("util.inc"); require_once("util.inc");
require_once("filter.inc"); require_once("filter.inc");
require_once("services.inc"); require_once("services.inc");
require_once("plugins.inc.d/dyndns.inc");
/* Interface IP address has changed */
if (isset($argv[1])) { if (isset($argv[1])) {
$argument = trim($argv[1], " \n"); $argument = trim($argv[1], " \n");
...@@ -42,13 +41,11 @@ if (isset($argv[1])) { ...@@ -42,13 +41,11 @@ if (isset($argv[1])) {
} }
if (empty($argument)) { if (empty($argument)) {
dyndns_configure_do(); dyndns_configure_do(true);
rfc2136_configure_do();
} else { } else {
$interface = lookup_gateway_interface_by_name($argument); $interface = lookup_gateway_interface_by_name($argument);
if (empty($interface)) { if (empty($interface)) {
$interface = $argument; $interface = $argument;
} }
dyndns_configure_do(false, $interface); dyndns_configure_do(true, $interface);
rfc2136_configure_do(false, $interface);
} }
#!/usr/local/bin/php
<?php
/*
Copyright (C) 2004 Scott Ullrich
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("config.inc");
require_once("interfaces.inc");
require_once("util.inc");
require_once("filter.inc");
require_once("services.inc");
require_once("plugins.inc.d/rfc2136.inc");
if (isset($argv[1])) {
$argument = trim($argv[1], " \n");
} else {
$argument = null;
}
if (empty($argument)) {
rfc2136_configure_do(true);
} else {
$interface = lookup_gateway_interface_by_name($argument);
if (empty($interface)) {
$interface = $argument;
}
rfc2136_configure_do(true, $interface);
}
[reload]
command:/usr/local/etc/rc.rfc2136.update
description:RFC 2136 Update
parameters:%s
type:script
message:updating rfc2136 %s
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment