From 3c007fa1d0ed8fb08c70b304702123942430b0fd Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:17:17 +0100 Subject: [PATCH] Samba update and to use smbcontrol for reload --- etc/rc.d/rc.samba | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/etc/rc.d/rc.samba b/etc/rc.d/rc.samba index 69572974e..089c4cda1 100755 --- a/etc/rc.d/rc.samba +++ b/etc/rc.d/rc.samba @@ -155,12 +155,12 @@ samba_stop(){ else REPLY="Stopped" # stop gracefully with SIGTERM - run killall smbd nmbd wsdd2 winbindd + run killall --ns $$ smbd nmbd wsdd2 winbindd samba_waitfor_shutdown if samba_running; then REPLY="Killed" # stop forcibly with SIGKILL - run killall -SIGKILL smbd nmbd wsdd2 winbindd + run killall --ns $$ -SIGKILL smbd nmbd wsdd2 winbindd samba_waitfor_shutdown fi if ! samba_running; then @@ -186,14 +186,12 @@ samba_restart(){ } samba_reload(){ - killall smbd nmbd wsdd2 winbindd 2>/dev/null + killall --ns $$ wsdd2 2>/dev/null # update settings samba_settings - # restart services - $SMBD -D 2>/dev/null - [[ $USE_NETBIOS == yes ]] && $NMBD -D 2>/dev/null + # reload services with smbcontrol + smbcontrol all reload-config 2>/dev/null [[ $USE_WSD == yes ]] && $WSDD2 -d ${WSD2_OPT## } 2>/dev/null - $WINBINDD -D 2>/dev/null } samba_update(){