summaryrefslogtreecommitdiff
path: root/net-fs/ksmbd-tools/files/ksmbd.initd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-17 07:14:19 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-17 07:14:19 +0000
commit66520d3148e31806a52cf7df5b8d91d5cd431670 (patch)
tree15d0c80d9ee1b1e2a454a9930a03e3d3b7c6cc61 /net-fs/ksmbd-tools/files/ksmbd.initd
parent0e82736d0df44565875b055019ded1be0ac5c319 (diff)
gentoo auto-resync : 17:01:2023 - 07:14:19
Diffstat (limited to 'net-fs/ksmbd-tools/files/ksmbd.initd')
-rw-r--r--net-fs/ksmbd-tools/files/ksmbd.initd32
1 files changed, 32 insertions, 0 deletions
diff --git a/net-fs/ksmbd-tools/files/ksmbd.initd b/net-fs/ksmbd-tools/files/ksmbd.initd
new file mode 100644
index 000000000000..744125c642dd
--- /dev/null
+++ b/net-fs/ksmbd-tools/files/ksmbd.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+KSMBD_CONF="${KSMBD_CONF:-/etc/ksmbd/ksmbd.conf}"
+
+depend() {
+ need localmount
+ use net
+}
+
+description="ksmbd userspace daemon"
+
+command="/sbin/ksmbd.mountd"
+command_control="/sbin/ksmbd.control"
+command_args="-s"
+
+required_files="${KSMBD_CONF}"
+
+start_pre() {
+ /sbin/modprobe ksmbd || return 1
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ "${command_control}" -s
+ eend $?
+}
+
+stop_post() {
+ /sbin/modprobe -r -q ksmbd || return 0
+}