diff options
Diffstat (limited to 'net-fs/ksmbd-tools/files/ksmbd.initd')
-rw-r--r-- | net-fs/ksmbd-tools/files/ksmbd.initd | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net-fs/ksmbd-tools/files/ksmbd.initd b/net-fs/ksmbd-tools/files/ksmbd.initd index 744125c642dd..86feb90b8da1 100644 --- a/net-fs/ksmbd-tools/files/ksmbd.initd +++ b/net-fs/ksmbd-tools/files/ksmbd.initd @@ -3,6 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 KSMBD_CONF="${KSMBD_CONF:-/etc/ksmbd/ksmbd.conf}" +KSMBD_OPTS="${KSMBD_OPTS:-}" depend() { need localmount @@ -13,17 +14,25 @@ description="ksmbd userspace daemon" command="/sbin/ksmbd.mountd" command_control="/sbin/ksmbd.control" -command_args="-s" +command_args="--config=${KSMBD_CONF} ${KSMBD_OPTS}" + +extra_started_commands="reload" required_files="${KSMBD_CONF}" +reload() { + ebegin "Reloading ${RC_SVCNAME}" + "${command_control}" --reload + eend $? +} + start_pre() { - /sbin/modprobe ksmbd || return 1 + /sbin/modprobe -q ksmbd || return 0 } stop() { ebegin "Stopping ${RC_SVCNAME}" - "${command_control}" -s + "${command_control}" --shutdown eend $? } |