summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/imuxsock/imuxsock.c7
-rw-r--r--rsyslog.service.in1
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
index 27597b78..29c9c949 100644
--- a/plugins/imuxsock/imuxsock.c
+++ b/plugins/imuxsock/imuxsock.c
@@ -68,8 +68,11 @@ MODULE_TYPE_NOKEEP
#define _PATH_LOG "/dev/log"
#endif
#endif
+#ifndef SYSTEMD_JOURNAL
+#define SYSTEMD_JOURNAL "/run/systemd/journal"
+#endif
#ifndef SYSTEMD_PATH_LOG
-#define SYSTEMD_PATH_LOG "/run/systemd/journal/syslog"
+#define SYSTEMD_PATH_LOG SYSTEMD_JOURNAL "/syslog"
#endif
/* emulate struct ucred for platforms that do not have it */
@@ -963,7 +966,7 @@ CODESTARTwillRun
listeners[0].sockName = pLogSockName;
else if(sd_booted()) {
struct stat st;
- if(stat(SYSTEMD_PATH_LOG, &st) != -1 && S_ISSOCK(st.st_mode)) {
+ if(stat(SYSTEMD_JOURNAL, &st) != -1 && S_ISDIR(st.st_mode)) {
listeners[0].sockName = SYSTEMD_PATH_LOG;
}
}
diff --git a/rsyslog.service.in b/rsyslog.service.in
index c03c9004..aa9e5db1 100644
--- a/rsyslog.service.in
+++ b/rsyslog.service.in
@@ -9,3 +9,4 @@ StandardOutput=null
[Install]
WantedBy=multi-user.target
+Alias=syslog.service