diff --git a/bundles/wireguard/metadata.py b/bundles/wireguard/metadata.py index 8bc3ddd..e2fe76d 100644 --- a/bundles/wireguard/metadata.py +++ b/bundles/wireguard/metadata.py @@ -262,17 +262,19 @@ def health_checks(metadata): checks[peer] = config['their_ip'] - if not checks: - return {} + if checks: + timer = { + 'wg-health-check': { + 'command': '/usr/local/bin/wg_health_check', + 'when': 'minutely', + }, + } + else: + timer = {} return { 'systemd-timers': { - 'timers': { - 'wg-health-check': { - 'command': '/usr/local/bin/wg_health_check', - 'when': 'minutely', - }, - }, + 'timers': timer, }, 'wireguard': { 'health_checks': checks,