From 755c796f4350ed64add42acd199de631aea98129 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 3 Sep 2020 23:16:59 +0200 Subject: ddclient: T2852: cleanup files after service deletion --- src/conf_mode/dynamic_dns.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/conf_mode') diff --git a/src/conf_mode/dynamic_dns.py b/src/conf_mode/dynamic_dns.py index 5cf526434..2c1cb5dc3 100755 --- a/src/conf_mode/dynamic_dns.py +++ b/src/conf_mode/dynamic_dns.py @@ -260,15 +260,15 @@ def generate(dyndns): def apply(dyndns): if dyndns is None: os.system('/etc/init.d/ddclient stop') + if os.path.exists(pid_file): + os.unlink(pid_file) if os.path.exists(config_file): os.unlink(config_file) + if os.path.exists(cache_file): + os.unlink(cache_file) else: - if os.path.exists(dyndns['pid_file']): - os.unlink(dyndns['pid_file']) - if os.path.exists(dyndns['cache_file']): - os.unlink(dyndns['cache_file']) - os.system('/etc/init.d/ddclient restart') + return None if __name__ == '__main__': -- cgit v1.2.3