summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/dns_dynamic.py8
-rw-r--r--src/systemd/isc-dhcp-relay6.service4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/conf_mode/dns_dynamic.py b/src/conf_mode/dns_dynamic.py
index e070a3502..67134e681 100755
--- a/src/conf_mode/dns_dynamic.py
+++ b/src/conf_mode/dns_dynamic.py
@@ -117,13 +117,17 @@ def generate(dyndns):
return None
def apply(dyndns):
+ systemd_service = 'ddclient.service'
+ # Reload systemd manager configuration
+ call('systemctl daemon-reload')
+
# bail out early - looks like removal from running config
if not dyndns or 'address' not in dyndns:
- call('systemctl stop ddclient.service')
+ call(f'systemctl stop {systemd_service}')
if os.path.exists(config_file):
os.unlink(config_file)
else:
- call('systemctl restart ddclient.service')
+ call(f'systemctl reload-or-restart {systemd_service}')
return None
diff --git a/src/systemd/isc-dhcp-relay6.service b/src/systemd/isc-dhcp-relay6.service
index 30037e013..a365ae4b3 100644
--- a/src/systemd/isc-dhcp-relay6.service
+++ b/src/systemd/isc-dhcp-relay6.service
@@ -5,7 +5,7 @@ Wants=network-online.target
RequiresMountsFor=/run
ConditionPathExists=/run/dhcp-relay/dhcrelay6.conf
After=vyos-router.service
-
+StartLimitIntervalSec=0
[Service]
Type=forking
WorkingDirectory=/run/dhcp-relay
@@ -15,6 +15,6 @@ EnvironmentFile=/run/dhcp-relay/dhcrelay6.conf
PIDFile=/run/dhcp-relay/dhcrelay6.pid
ExecStart=/usr/sbin/dhcrelay -6 -pf /run/dhcp-relay/dhcrelay6.pid $OPTIONS
Restart=always
-
+RestartSec=10
[Install]
WantedBy=multi-user.target