From 7a78cb8a80ef0f9fd90da6e9bcfc211ddd3194fd Mon Sep 17 00:00:00 2001 From: Firstyear Date: Fri, 16 Feb 2024 12:24:37 +1000 Subject: [PATCH] Conflict nscd, start before sshd (#2539) --- platform/debian/systemd/kanidm-unixd.service | 7 +++++-- platform/opensuse/kanidm-unixd.service | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/platform/debian/systemd/kanidm-unixd.service b/platform/debian/systemd/kanidm-unixd.service index 0004e0015..19d3d469f 100644 --- a/platform/debian/systemd/kanidm-unixd.service +++ b/platform/debian/systemd/kanidm-unixd.service @@ -3,9 +3,12 @@ [Unit] Description=Kanidm Local Client Resolver -After=chronyd.service ntpd.service network-online.target -Before=systemd-user-sessions.service nss-user-lookup.target +After=chronyd.service nscd.service ntpd.service network-online.target +Before=systemd-user-sessions.service sshd.service nss-user-lookup.target Wants=nss-user-lookup.target +# While it seems confusing, we need to be after nscd.service so that the +# Conflicts will triger and then automatically stop it. +Conflicts=nscd.service [Service] DynamicUser=yes diff --git a/platform/opensuse/kanidm-unixd.service b/platform/opensuse/kanidm-unixd.service index de3aa7f17..f817189af 100644 --- a/platform/opensuse/kanidm-unixd.service +++ b/platform/opensuse/kanidm-unixd.service @@ -3,9 +3,12 @@ [Unit] Description=Kanidm Local Client Resolver -After=chronyd.service ntpd.service network-online.target -Before=systemd-user-sessions.service nss-user-lookup.target +After=chronyd.service nscd.service ntpd.service network-online.target +Before=systemd-user-sessions.service sshd.service nss-user-lookup.target Wants=nss-user-lookup.target +# While it seems confusing, we need to be after nscd.service so that the +# Conflicts will triger and then automatically stop it. +Conflicts=nscd.service [Service] DynamicUser=yes