From 9542512d7be40f2000298c86d3d2b728f4f0f65a Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 7 Jan 2014 15:43:13 -0500 Subject: BUILD: Simplify enabling journald on installed systems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit systemd supports overrides of the standard service file to be placed in /etc/systemd/system/.service.d/ With this patch, we will install a commented-out override file to /etc that will instruct the user on how to enable logging to journald. Reviewed-by: Jakub Hrozek Reviewed-by: Lukáš Slebodník --- src/conf_macros.m4 | 20 ++++++++++++++++++++ src/sysv/systemd/journal.conf.in | 7 +++++++ 2 files changed, 27 insertions(+) create mode 100644 src/sysv/systemd/journal.conf.in (limited to 'src') diff --git a/src/conf_macros.m4 b/src/conf_macros.m4 index 4be819d4..71118593 100644 --- a/src/conf_macros.m4 +++ b/src/conf_macros.m4 @@ -221,6 +221,26 @@ AC_DEFUN([WITH_SYSTEMD_UNIT_DIR], AC_SUBST(systemdunitdir) ]) +dnl A macro to configure the directory to install the systemd unit file +dnl overrides to +AC_DEFUN([WITH_SYSTEMD_CONF_DIR], + [ AC_ARG_WITH([systemdconfdir], + [ AC_HELP_STRING([--with-systemdconfdir=DIR], + [Directory for systemd service file overrides [Auto]] + ), + ], + ) + if test x"$with_systemdconfdir" != x; then + systemdconfdir=$with_systemdconfdir + else + systemdconfdir=$($PKG_CONFIG --variable=systemdsystemconfdir systemd) + if test x"$systemdconfdir" = x; then + AC_MSG_ERROR([Could not detect systemd config directory]) + fi + fi + AC_SUBST(systemdconfdir) + ]) + AC_DEFUN([WITH_MANPAGES], [ AC_ARG_WITH([manpages], [AC_HELP_STRING([--with-manpages], diff --git a/src/sysv/systemd/journal.conf.in b/src/sysv/systemd/journal.conf.in new file mode 100644 index 00000000..d89325e0 --- /dev/null +++ b/src/sysv/systemd/journal.conf.in @@ -0,0 +1,7 @@ +[Service] +# Uncomment *both* of the following lines to enable debug logging +# to go to journald instead of /var/log/sssd. You will need to +# run 'systemctl daemon-reload' and then restart the SSSD service +# for this to take effect +#ExecStart= +#ExecStart=@sbindir@/sssd -D -- cgit