🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
fix(server): require additional variable to enable systemd logging (#5222)
Kendall Garner8a19fa9991f4
diff --git a/cmd/svc.go b/cmd/svc.goindex e277bd459..89ca08056 100644--- a/cmd/svc.go+++ b/cmd/svc.go@@ -248,6 +248,7 @@ ExecStart={{.Path|cmdEscape}}{{range .Arguments}} {{.|cmd}}{{end}}TimeoutStopSec=20RestartSec=120EnvironmentFile=-/etc/sysconfig/{{.Name}}+Environment="ND_SYSTEMD_PRIORITY_LOGGING=1"DevicePolicy=closedNoNewPrivileges=yesdiff --git a/conf/configuration.go b/conf/configuration.goindex a5c253746..5f74d6db0 100644--- a/conf/configuration.go+++ b/conf/configuration.go@@ -341,9 +341,11 @@ func Load(noConfigDump bool) {os.Exit(1)}log.SetOutput(out)- } else if os.Getenv("JOURNAL_STREAM") != "" {+ } else if os.Getenv("ND_SYSTEMD_PRIORITY_LOGGING") != "" && os.Getenv("JOURNAL_STREAM") != "" {// When running under systemd, prepend syslog priority prefixes so// journald assigns the correct severity to each log line.+ // Note that we have an additional environment variable, as JOURNAL_STREAM+ // can be present in a systemd environment even if not running as a systemd servicelog.EnableJournalFormat()}