Commit Graph

9 Commits

Author SHA1 Message Date
Joachim Wiberg
7ec64e5f9c Fix #62: early log messages lost when running in systemd
This is a follow-up to d7576c7 which initially added support for running
in systemd based systems.  Since the unit file sources the syslog.socket
we have /run/systemd/journal/syslog open already on descriptor 3.  All
we need to do is verify that's the mode syslogd runs in.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-22 08:27:57 +02:00
Joachim Wiberg
c82c004de7 syslogd.service: KillMode=process is not recommended, drop
The default 'control-group' ensures all processes started by sysklogd
are stopped when the service is stopped, this is what we want.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-22 07:40:24 +02:00
Joachim Wiberg
d7576c7fc0 syslogd.service: use journald socket, not /dev/log
This patch fixes integration with systemd-journald, and also sets the
now mandatory KillMode.

When running on systems with systemd-journald certain considerations
must be taken.  These are listed here:

  https://www.freedesktop.org/wiki/Software/systemd/syslog/

In it simplest form, the system as a whole logs through journald and
a BSD syslog daemon then gets its log messages from journald.

NOTE: due to issues with the Debian packaging of rsyslog, the sysklogd
      packages cannot be used to replace rsyslog.  First rsyslog must
      be purged to clear the syslog.socket symlink, then sysklogd can
      be installed.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2021-06-24 12:46:34 +02:00
Joachim Wiberg
e58b0cf180 syslogd.service: read SYSLOGD_OPTS from /etc/default/syslogd
- drop hard-coded -s from syslogd command line
- allow options to be read from /etc/default/syslogd

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2021-02-21 13:07:56 +01:00
Joachim Nilsson
cf9d281e5b syslogd: Adopt FreeBSD -F instead of -n to run in foreground
This change will probably break most installations.  We do this to free
up '-n' for use as disabling DNS lookups, from FreeBSD *and* NetBSD.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-13 17:08:47 +01:00
Joachim Nilsson
f606667038 syslogd: Add support for FreeBSD -s, secure mode
- Update man page
- Enable -s in default systemd service settings
- Add support for SecureMode, with shutdown()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-12 13:28:02 +01:00
Joachim Nilsson
5a32c5a66c Add pointers to service man pages in unit files
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-05 19:20:17 +02:00
Joachim Nilsson
2ceaab2a1d Run syslogd and klogd in foreground under systemd
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-05 19:18:40 +02:00
Joachim Nilsson
cda4c6a037 Integrate systemd unit files with paths from configure
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-08-05 19:15:44 +02:00