blob: f65770ed44c675d63983d5c5e03fb1b1ee31a3a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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/smb.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
}
|