init.d-files improved.

This commit is contained in:
2026-10-07 20:26:38 +00:00
parent 6b6363cfef
commit 7fe3a247d3
4 changed files with 39 additions and 5 deletions
@@ -2,10 +2,10 @@
# Copyright 2016-2026 Gentoo Authors # Copyright 2016-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
description="Kanidm-unixd: client-helper tool for the kanidm identity management platform" description="Kanidm Local Tasks"
depend() { depend() {
before radius after kanidm-unixd
} }
: ${KANIDM_CONF:=/etc/kanidm/unix} : ${KANIDM_CONF:=/etc/kanidm/unix}
@@ -14,7 +14,8 @@ depend() {
: ${KANIDM_WORK_DIR:=/var/lib/kanidm} : ${KANIDM_WORK_DIR:=/var/lib/kanidm}
: ${KANIDM_CUSTOM:=${KANIDM_WORK_DIR}/custom} : ${KANIDM_CUSTOM:=${KANIDM_WORK_DIR}/custom}
command="/usr/bin/kanidm-unix" capabilities="CAP_CHOWN CAP_FOWNER CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH"
command="/usr/bin/kanidm_unixd_tasks"
#command_args="--config-path ${KANIDM_CONF} server" #command_args="--config-path ${KANIDM_CONF} server"
command_background="true" command_background="true"
command_user="${KANIDM_USER}:${KANIDM_GROUP}" command_user="${KANIDM_USER}:${KANIDM_GROUP}"
+29
View File
@@ -0,0 +1,29 @@
#!/sbin/openrc-run
# Copyright 2016-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="Kanidm Local Client Resolver"
depend() {
need net
after ntpd
}
: ${KANIDM_CONF:=/etc/kanidm/unix}
: ${KANIDM_USER:=kanidm}
: ${KANIDM_GROUP:=kanidm}
: ${KANIDM_WORK_DIR:=/var/lib/kanidm-unixd}
: ${KANIDM_CUSTOM:=${KANIDM_WORK_DIR}/custom}
command="/usr/bin/kanidm_unixd"
#command_args="--config-path ${KANIDM_CONF} server"
command_background="true"
command_user="${KANIDM_USER}:${KANIDM_GROUP}"
error_log="/var/log/kanidm/${RC_SVCNAME}.err"
output_log="/var/log/kanidm/${RC_SVCNAME}.log"
pidfile="/run/${RC_SVCNAME}.pid"
#required_files="${KANIDM_CONF}"
start_pre() {
checkpath -m0750 -o "${KANIDM_USER:-root}:${KANIDM_GROUP:-root}" -d /run/${RC_SVCNAME} -d /var/cache/${RC_SVCNAME} -d /var/lib/${RC_SVCNAME}
}
+2 -1
View File
@@ -2,9 +2,10 @@
# Copyright 2016-2025 Gentoo Authors # Copyright 2016-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
description="Kanidm: simple, secure, and fast identity management platform" description="Kanidm Identity Server"
depend() { depend() {
need net
before radius before radius
} }
+4 -1
View File
@@ -95,7 +95,7 @@ src_install() {
fi fi
insinto /etc/kanidm insinto /etc/kanidm
newins examples/kanidm config doins examples/config
doins examples/radius.toml doins examples/radius.toml
doins examples/unixd doins examples/unixd
fperms 0644 /etc/kanidm/{,config,radius.toml,unixd} fperms 0644 /etc/kanidm/{,config,radius.toml,unixd}
@@ -109,6 +109,9 @@ src_install() {
done done
systemd_dounit platform/opensuse/kanidm-unixd.service systemd_dounit platform/opensuse/kanidm-unixd.service
systemd_dounit platform/opensuse/kanidm-unixd-tasks.service systemd_dounit platform/opensuse/kanidm-unixd-tasks.service
newinitd "${FILESDIR}/kanidm-unixd.initd" kanidm-unixd
newinitd "${FILESDIR}/kanidm-unixd-tasks.initd" kanidm-unixd-tasks
keepdir /var/log/kanidm keepdir /var/log/kanidm
if use server; then if use server; then