diff options
Diffstat (limited to 'src/op_mode/dynamic_dns.py')
-rwxr-xr-x | src/op_mode/dynamic_dns.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/op_mode/dynamic_dns.py b/src/op_mode/dynamic_dns.py index d991848ad..e4e5043d5 100755 --- a/src/op_mode/dynamic_dns.py +++ b/src/op_mode/dynamic_dns.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2018 VyOS maintainers and contributors +# Copyright (C) 2018-2020 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -21,10 +21,9 @@ import sys import time from vyos.config import Config -from vyos.util import run +from vyos.util import call - -cache_file = r'/var/cache/ddclient/ddclient.cache' +cache_file = r'/run/ddclient/ddclient.cache' OUT_TMPL_SRC = """ {%- for entry in hosts -%} @@ -86,9 +85,9 @@ def show_status(): def update_ddns(): - run('systemctl stop ddclient') + call('systemctl stop ddclient.service') os.remove(cache_file) - run('systemctl start ddclient') + call('systemctl start ddclient.service') def main(): |