all: ensure ctrld started after mongodb on Ubios

Because ctrld needs to query custom client mapping from it.

While at it, also make the error message clearer when initializing ubios
discover failed, by attaching the command output to returned error.
This commit is contained in:
Cuong Manh Le
2025-02-13 00:46:56 +07:00
committed by Cuong Manh Le
parent 3403b2039d
commit 4ebe2fb5f4
4 changed files with 23 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ import (
"tailscale.com/health"
"github.com/Control-D-Inc/ctrld/internal/dns"
"github.com/Control-D-Inc/ctrld/internal/router"
)
func init() {
@@ -39,6 +40,9 @@ func setDependencies(svc *service.Config) {
svc.Dependencies = append(svc.Dependencies, "Wants=systemd-networkd-wait-online.service")
}
}
if routerDeps := router.ServiceDependencies(); len(routerDeps) > 0 {
svc.Dependencies = append(svc.Dependencies, routerDeps...)
}
}
func setWorkingDirectory(svc *service.Config, dir string) {