mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-22 14:38:12 +02:00
Supervision du moteur sans systemd (conteneur Docker)
Nouveau sys_service_container.go : supervision par fichier PID portée du mode utilisateur macOS (Setsid, SIGTERM sur le groupe puis SIGKILL, log fichier). sys_service_linux.go bascule automatiquement quand /run/systemd/system est absent ou que LOKI_CONTAINER=1 ; une install systemd classique est inchangée. Le tunnel ajean.link suit la même logique (uiServiceCtl / uiServiceActive). Sans ce repli, changer de modèle depuis l'UI (serviceAction restart) échouait sur un systemctl absent — le conteneur était inutilisable. Testé sans systemd : start / status / restart / stop, PID suivi, processus enfant arrêté avec le groupe. build linux+darwin+windows OK, go vet + go test verts.
This commit is contained in:
10 files changed
+236
-9
No files matched your search
@@ -152,6 +152,9 @@ func serviceIsActive() bool {
|
||||
func pidFilePath() string { return filepath.Join(LokiHome(), serviceName()+".pid") }
|
||||
func logFilePath() string { return filepath.Join(LokiHome(), serviceName()+".log") }
|
||||
|
||||
// systemdAvailable : jamais de systemd sur macOS (consulté par relay_link.go).
|
||||
func systemdAvailable() bool { return false }
|
||||
|
||||
func userSvcAction(action string) error {
|
||||
switch action {
|
||||
case "start":
|
||||
|
||||
Reference in new issue
Block a user