summaryrefslogtreecommitdiff
path: root/src/op_mode/dynamic_dns.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/op_mode/dynamic_dns.py')
-rwxr-xr-xsrc/op_mode/dynamic_dns.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/op_mode/dynamic_dns.py b/src/op_mode/dynamic_dns.py
index 0d457e247..405dd9f04 100755
--- a/src/op_mode/dynamic_dns.py
+++ b/src/op_mode/dynamic_dns.py
@@ -21,6 +21,8 @@ import sys
import time
from vyos.config import Config
+from vyos.util import call
+
cache_file = r'/var/cache/ddclient/ddclient.cache'
@@ -84,9 +86,9 @@ def show_status():
def update_ddns():
- os.system('systemctl stop ddclient')
+ call('systemctl stop ddclient')
os.remove(cache_file)
- os.system('systemctl start ddclient')
+ call('systemctl start ddclient')
def main():