From a7b29e0655dd69d27ac8e69e9ca8574caeac06d2 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Fri, 23 Oct 2026 22:59:17 +0200 Subject: [PATCH] fix: the status always shows the state of slapd. --- README.md | 6 +++--- debian-package/debian/changelog | 10 ++++++++++ debian-package/src/usr/lib/vpn-router/web | 4 +--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9c80fd0..29d9983 100644 --- a/README.md +++ b/README.md @@ -416,9 +416,9 @@ authentication, and shows no configuration: no key, identity, address or subnet. | `/config` | The configuration without its secret options, and what the router resolved and runs, as JSON; needs a token | | `/users` | The users of OpenVPN and road-warrior access; needs a token | -The status holds the state of `vpn-router-setup`, of `strongswan` when site-to-site or road-warrior -access is configured, of `wg-quick@wg0` when WireGuard is, of `openvpn-server@vpn-router` when -OpenVPN is, and of `slapd` when either OpenVPN or road-warrior access is; the number of connected +The status holds the state of `vpn-router-setup` and `slapd`, of `strongswan` when site-to-site or +road-warrior access is configured, of `wg-quick@wg0` when WireGuard is, and of +`openvpn-server@vpn-router` when OpenVPN is; the number of connected OpenVPN clients, from the server's status file, which OpenVPN rewrites every minute; the package version; whether Docker is installed, and when it is, the state of `docker.service` and of `vpn-router-docker` (the Docker rules), which do not change `status`; whether the diff --git a/debian-package/debian/changelog b/debian-package/debian/changelog index 7221e6e..dc3b1dc 100644 --- a/debian-package/debian/changelog +++ b/debian-package/debian/changelog @@ -1,3 +1,13 @@ +vpn-router (0.5.3-1) unstable; urgency=medium + + fix: the status always shows the state of slapd. + + * /status and the status page show the state of slapd whether or not + OpenVPN or road-warrior access is configured, since the package always + runs it. + + -- Slawomir Koszewski Sat, 24 Oct 2026 12:00:00 +0200 + vpn-router (0.5.2-1) unstable; urgency=medium fix: /config no longer shows secret options. diff --git a/debian-package/src/usr/lib/vpn-router/web b/debian-package/src/usr/lib/vpn-router/web index cad9d7d..217875a 100644 --- a/debian-package/src/usr/lib/vpn-router/web +++ b/debian-package/src/usr/lib/vpn-router/web @@ -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',