fix: /config gives the state of caddy.service with the installed Caddy, for the Router Manager's Web page.
Release / release (push) Failing after 17m18s

This commit is contained in:
slawek committed 2026-10-26 07:18:39 +01:00
1 parent 7d8892b8c4
commit a1f314d8c1
3 files changed
+12 -4

No files matched your search

+3 -3
View File
@@ -403,7 +403,7 @@ def postgresql_databases():
def details(state):
"""What /config shows: the configuration without its secrets, and what the router resolved and runs; caddy is the
installed Caddy, {version, source}, null when it is not installed."""
installed Caddy, {version, source, service}, service the state of caddy.service, null when it is not installed."""
configuration = state.get('configuration', {})
caddy = package_version('caddy')
return {
@@ -420,8 +420,8 @@ def details(state):
},
'postgresql': postgresql_configuration(),
# Caddy is upstream's once its repository is configured (vpn-router-caddy).
'caddy': {'version': caddy, 'source': 'upstream' if vpnrouter.CADDY_APT_SOURCE.is_file() else 'ubuntu'}
if caddy else None,
'caddy': {'version': caddy, 'source': 'upstream' if vpnrouter.CADDY_APT_SOURCE.is_file() else 'ubuntu',
'service': unit_state('caddy.service')} if caddy else None,
}