diff options
Diffstat (limited to 'net-fs/ksmbd-tools/files/ksmbd.initd')
-rw-r--r-- | net-fs/ksmbd-tools/files/ksmbd.initd | 32 |
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 +} |