We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ea4b780 + 2e21bc3 commit 62a55b9Copy full SHA for 62a55b9
etc/rc.d/rc.samba
@@ -155,12 +155,17 @@ samba_stop(){
155
REPLY="Already stopped"
156
else
157
REPLY="Stopped"
158
+ # stop gracefully with SIGTERM the "master" smbd process first
159
+ master=$(ps -o pid=,ppid= -C smbd | awk '$2==1 {print $1}')
160
+ [[ -n "master" ]] && run kill "$master"
161
+ sleep 1
162
# stop gracefully with SIGTERM
163
run killall --ns $$ smbd nmbd wsdd2 winbindd
164
samba_waitfor_shutdown
165
if samba_running; then
166
REPLY="Killed"
167
# stop forcibly with SIGKILL
168
+ [[ -n "master" ]] && run kill -SIGKILL "master"
169
run killall --ns $$ -SIGKILL smbd nmbd wsdd2 winbindd
170
171
fi
0 commit comments