]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dovecot.service: Set type to notify only when compiling with systemd
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 26 Apr 2021 05:29:02 +0000 (08:29 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 26 Apr 2021 11:22:19 +0000 (14:22 +0300)
Makefile.am
configure.ac
dovecot.service.in

index 88a40ffbe3a248b8f2838570f256c8769809ee3f..34f58c79a87c624113e6d979d64a2301aabd1d27 100644 (file)
@@ -64,6 +64,7 @@ if HAVE_LIBSYSTEMD
        $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' \
        -e 's,@bindir\@,$(bindir),g' \
        -e 's,@rundir\@,$(rundir),g' \
+       -e 's,@systemdservicetype\@,$(systemdservicetype),g' \
        $< > $@
 
 systemdsystemunit_DATA = \
index f34db514b4df04bbc1e2e443e1bcb3bed651d99a..19242beb602fee303d55fdf7d9c59064d3801f24 100644 (file)
@@ -244,10 +244,13 @@ AC_ARG_WITH([systemd],
    want_systemd="$withval"
 )
 
+systemdservicetype='simple'
+
 AS_IF([test "$want_systemd" != "no"], [
   PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [
     AC_DEFINE([HAVE_LIBSYSTEMD],[1], [Define to 1 if you have libsystemd])
     systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`
+    systemdservicetype='notify'
   ], [AS_IF([test "$want_systemd" = "yes"], [
        AC_MSG_ERROR([libsystemd not found])
      ],
@@ -256,6 +259,7 @@ AS_IF([test "$want_systemd" != "no"], [
 ])
 
 AC_SUBST(systemdsystemunitdir)
+AC_SUBST(systemdservicetype)
 AM_CONDITIONAL(HAVE_LIBSYSTEMD, [test "$want_systemd" != "no"])
 
 dovecot_moduledir="$libdir/dovecot"
index 6aae19439afe0c2df6480edb2f5f75d5330ba0ea..3455cceaae70bed86b5598b50f244dd526a8ceea 100644 (file)
@@ -14,7 +14,7 @@ Documentation=https://doc.dovecot.org/
 After=local-fs.target network-online.target
 
 [Service]
-Type=notify
+Type=@systemdservicetype@
 ExecStart=@sbindir@/dovecot -F
 ExecReload=@bindir@/doveadm reload
 ExecStop=@bindir@/doveadm stop