summaryrefslogtreecommitdiff
path: root/security/kanidm/files
diff options
context:
space:
mode:
Diffstat (limited to 'security/kanidm/files')
-rw-r--r--security/kanidm/files/kanidm_unixd.in8
-rw-r--r--security/kanidm/files/kanidm_unixd_tasks.in6
-rw-r--r--security/kanidm/files/kanidmd.in27
3 files changed, 34 insertions, 7 deletions
diff --git a/security/kanidm/files/kanidm_unixd.in b/security/kanidm/files/kanidm_unixd.in
index adc76d1c92c2..10b5226520cb 100644
--- a/security/kanidm/files/kanidm_unixd.in
+++ b/security/kanidm/files/kanidm_unixd.in
@@ -1,7 +1,7 @@
#!/bin/sh
# PROVIDE: kanidm_unixd
-# REQUIRE: LOGIN
+# REQUIRE: LOGIN kanidm_unixd_tasks
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
@@ -19,9 +19,9 @@ load_rc_config $name
: ${kanidm_unixd_enable:="NO"}
-pidfile="/var/run/kanidm-unixd.pid"
+pidfile="/var/run/kanidm_unixd.pid"
command=/usr/sbin/daemon
-command_args="-u %%USER%% -p /var/run/kanidm-unixd.pid -T kanidm_unixd /usr/local/libexec/${name}"
-procname=/usr/local/libexec/${name}
+command_args="-u %%USER%% -p /var/run/kanidm_unixd.pid -T kanidm_unixd %%PREFIX%%/libexec/${name}"
+procname=%%PREFIX%%/libexec/${name}
run_rc_command "$1"
diff --git a/security/kanidm/files/kanidm_unixd_tasks.in b/security/kanidm/files/kanidm_unixd_tasks.in
index ed2a2e3309d0..970ae009590f 100644
--- a/security/kanidm/files/kanidm_unixd_tasks.in
+++ b/security/kanidm/files/kanidm_unixd_tasks.in
@@ -19,9 +19,9 @@ load_rc_config $name
: ${kanidm_unixd_tasks_enable:="NO"}
-pidfile="/var/run/kanidm-unixd-tasks.pid"
+pidfile="/var/run/kanidm_unixd_tasks.pid"
command=/usr/sbin/daemon
-command_args="-u root -p /var/run/kanidm-unixd-tasks.pid -T kanidm_unixd_tasks /usr/local/libexec/${name}"
-procname=/usr/local/libexec/${name}
+command_args="-u root -p /var/run/kanidm_unixd_tasks.pid -T kanidm_unixd_tasks %%PREFIX%%/libexec/${name}"
+procname=%%PREFIX%%/libexec/${name}
run_rc_command "$1"
diff --git a/security/kanidm/files/kanidmd.in b/security/kanidm/files/kanidmd.in
new file mode 100644
index 000000000000..db80a5028cfb
--- /dev/null
+++ b/security/kanidm/files/kanidmd.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# PROVIDE: kanidmd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add these lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# kanidmd_enable (bool): Set to NO by default.
+# Set it to YES to enable kanidm_unixd.
+
+. /etc/rc.subr
+
+name=kanidmd
+rcvar=kanidmd_enable
+
+load_rc_config $name
+
+: ${kanidmd_enable:="NO"}
+
+pidfile="/var/run/kanidmd.pid"
+command=/usr/sbin/daemon
+command_args="-u %%USER%% -p /var/run/kanidmd.pid -T kanidmd %%PREFIX%%/libexec/${name}"
+procname=%%PREFIX%%/libexec/${name}
+
+run_rc_command "$1"