|
Lines 77-85
Link Here
|
| 77 |
log_daemon_msg "Stopping $DESC" $NAME |
77 |
log_daemon_msg "Stopping $DESC" $NAME |
| 78 |
## sometimes samba takes a long time to terminate, |
78 |
## sometimes samba takes a long time to terminate, |
| 79 |
## which would make starting new samba processes fail. |
79 |
## which would make starting new samba processes fail. |
| 80 |
pids=$(pgrep -F "$PIDFILE"; pgrep --exact '(smbd|winbindd)') |
80 |
pid_samba=$(pgrep -F "$PIDFILE") |
|
|
81 |
pid_smbd=$(pgrep --exact 'smbd') |
| 82 |
pid_winbindd=$(pgrep --exact 'winbindd') |
| 81 |
start-stop-daemon --stop --quiet --pidfile $PIDFILE --name samba |
83 |
start-stop-daemon --stop --quiet --pidfile $PIDFILE --name samba |
| 82 |
ret="$?" |
84 |
ret="$?" |
|
|
85 |
[ -n "$pid_smbd" ] && start-stop-daemon --stop --quiet --pid $pid_smbd --name smbd |
| 86 |
[ -n "$pid_winbindd" ] && start-stop-daemon --stop --quiet --pid $pid_winbindd --name winbindd |
| 87 |
pids=$(echo $pid_samba; echo $pid_smbd; echo $pid_winbindd) |
| 83 |
if [ -n "$pids" ]; then |
88 |
if [ -n "$pids" ]; then |
| 84 |
unset pgids kgids |
89 |
unset pgids kgids |
| 85 |
for pid in $pids; do |
90 |
for pid in $pids; do |