fix: the status always shows the state of slapd.
Release / release (push) Successful in 19s

This commit is contained in:
slawek committed 2026-10-23 22:59:17 +02:00
1 parent c377801be0
commit a7b29e0655
3 files changed
+14 -6

No files matched your search

+1 -3
View File
@@ -224,15 +224,13 @@ def openvpn_clients():
def collect(state):
"""The status document. state says which features the router has."""
units = {'vpn-router-setup': unit_state('vpn-router-setup.service')}
units = {'vpn-router-setup': unit_state('vpn-router-setup.service'), 'slapd': unit_state('slapd.service')}
if state.get('site_to_site') or state.get('p2s'):
units['strongswan'] = unit_state('strongswan.service')
if state.get('wireguard'):
units['wg-quick@wg0'] = unit_state('wg-quick@wg0.service')
if state.get('openvpn'):
units['openvpn-server@vpn-router'] = unit_state('openvpn-server@vpn-router.service')
if state.get('users'):
units['slapd'] = unit_state('slapd.service')
status = {
'status': 'ok' if all(value == 'active' for value in units.values()) else 'degraded',