This commit is contained in:
1 parent
c377801be0
commit
a7b29e0655
3 files changed
+14
-6
No files matched your search
@@ -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 |
|
| `/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 |
|
| `/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
|
The status holds the state of `vpn-router-setup` and `slapd`, of `strongswan` when site-to-site or
|
||||||
access is configured, of `wg-quick@wg0` when WireGuard is, of `openvpn-server@vpn-router` when
|
road-warrior access is configured, of `wg-quick@wg0` when WireGuard is, and of
|
||||||
OpenVPN is, and of `slapd` when either OpenVPN or road-warrior access is; the number of connected
|
`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
|
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`
|
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
|
(the Docker rules), which do not change `status`; whether the
|
||||||
|
|||||||
@@ -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 <slawek@koszewscy.waw.pl> Sat, 24 Oct 2026 12:00:00 +0200
|
||||||
|
|
||||||
vpn-router (0.5.2-1) unstable; urgency=medium
|
vpn-router (0.5.2-1) unstable; urgency=medium
|
||||||
|
|
||||||
fix: /config no longer shows secret options.
|
fix: /config no longer shows secret options.
|
||||||
|
|||||||
@@ -224,15 +224,13 @@ def openvpn_clients():
|
|||||||
|
|
||||||
def collect(state):
|
def collect(state):
|
||||||
"""The status document. state says which features the router has."""
|
"""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'):
|
if state.get('site_to_site') or state.get('p2s'):
|
||||||
units['strongswan'] = unit_state('strongswan.service')
|
units['strongswan'] = unit_state('strongswan.service')
|
||||||
if state.get('wireguard'):
|
if state.get('wireguard'):
|
||||||
units['wg-quick@wg0'] = unit_state('wg-quick@wg0.service')
|
units['wg-quick@wg0'] = unit_state('wg-quick@wg0.service')
|
||||||
if state.get('openvpn'):
|
if state.get('openvpn'):
|
||||||
units['openvpn-server@vpn-router'] = unit_state('openvpn-server@vpn-router.service')
|
units['openvpn-server@vpn-router'] = unit_state('openvpn-server@vpn-router.service')
|
||||||
if state.get('users'):
|
|
||||||
units['slapd'] = unit_state('slapd.service')
|
|
||||||
|
|
||||||
status = {
|
status = {
|
||||||
'status': 'ok' if all(value == 'active' for value in units.values()) else 'degraded',
|
'status': 'ok' if all(value == 'active' for value in units.values()) else 'degraded',
|
||||||
|
|||||||
Reference in new issue
Block a user