Commit 288cf94e authored by ale's avatar ale

Systemd socket activation takes precedence over --socket

parent 284580fc
Pipeline #8378 passed with stages
in 1 minute and 49 seconds
......@@ -125,13 +125,7 @@ func main() {
srv.RequestTimeout = *requestTimeout
var servers []genericServer
if *socketPath != "" {
l, err := lineproto.NewUNIXSocketListener(*socketPath)
if err != nil {
log.Fatal(err)
}
servers = append(servers, lineproto.NewServer("unix", l, srv))
}
// For legacy reasons, systemd-socket takes precedence over socket.
if *systemdSocketActivation {
ll, err := activation.Listeners()
if err != nil {
......@@ -140,6 +134,12 @@ func main() {
for _, l := range ll {
servers = append(servers, lineproto.NewServer("systemd", l, srv))
}
} else if *socketPath != "" {
l, err := lineproto.NewUNIXSocketListener(*socketPath)
if err != nil {
log.Fatal(err)
}
servers = append(servers, lineproto.NewServer("unix", l, srv))
}
if *tcpAddr != "" {
var llsrv lineproto.Handler = srv
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment