notify dyndns from netconfigd, i.e. _after_ applying addresses
This commit is contained in:
parent
ffc18ec527
commit
0e6add220c
@ -61,9 +61,6 @@ func logic() error {
|
|||||||
if err := notify.Process("/user/netconfi", syscall.SIGUSR1); err != nil {
|
if err := notify.Process("/user/netconfi", syscall.SIGUSR1); err != nil {
|
||||||
log.Printf("notifying netconfig: %v", err)
|
log.Printf("notifying netconfig: %v", err)
|
||||||
}
|
}
|
||||||
if err := notify.Process("/user/dyndns", syscall.SIGUSR1); err != nil {
|
|
||||||
log.Printf("notifying dyndns: %v", err)
|
|
||||||
}
|
|
||||||
select {
|
select {
|
||||||
case <-time.After(time.Until(c.Config().RenewAfter)):
|
case <-time.After(time.Until(c.Config().RenewAfter)):
|
||||||
// fallthrough and renew the DHCP lease
|
// fallthrough and renew the DHCP lease
|
||||||
|
@ -57,9 +57,6 @@ func logic() error {
|
|||||||
if err := notify.Process("/user/radvd", syscall.SIGUSR1); err != nil {
|
if err := notify.Process("/user/radvd", syscall.SIGUSR1); err != nil {
|
||||||
log.Printf("notifying radvd: %v", err)
|
log.Printf("notifying radvd: %v", err)
|
||||||
}
|
}
|
||||||
if err := notify.Process("/user/dyndns", syscall.SIGUSR1); err != nil {
|
|
||||||
log.Printf("notifying dyndns: %v", err)
|
|
||||||
}
|
|
||||||
select {
|
select {
|
||||||
case <-time.After(time.Until(c.Config().RenewAfter)):
|
case <-time.After(time.Until(c.Config().RenewAfter)):
|
||||||
// fallthrough and renew the DHCP lease
|
// fallthrough and renew the DHCP lease
|
||||||
|
@ -10,6 +10,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
"github.com/google/nftables"
|
"github.com/google/nftables"
|
||||||
"github.com/google/nftables/binaryutil"
|
"github.com/google/nftables/binaryutil"
|
||||||
@ -19,6 +20,7 @@ import (
|
|||||||
|
|
||||||
"router7/internal/dhcp4"
|
"router7/internal/dhcp4"
|
||||||
"router7/internal/dhcp6"
|
"router7/internal/dhcp6"
|
||||||
|
"router7/internal/notify"
|
||||||
"router7/internal/teelogger"
|
"router7/internal/teelogger"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -545,6 +547,10 @@ func Apply(dir, root string) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := notify.Process("/user/dyndns", syscall.SIGUSR1); err != nil {
|
||||||
|
log.Printf("notifying dyndns: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
if err := applySysctl(); err != nil {
|
if err := applySysctl(); err != nil {
|
||||||
if firstErr == nil {
|
if firstErr == nil {
|
||||||
firstErr = fmt.Errorf("sysctl: %v", err)
|
firstErr = fmt.Errorf("sysctl: %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user