aboutsummaryrefslogtreecommitdiffstats
path: root/main/openssh/sshd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/openssh/sshd.initd')
-rw-r--r--main/openssh/sshd.initd4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/openssh/sshd.initd b/main/openssh/sshd.initd
index 912d435c99..35430c5e42 100644
--- a/main/openssh/sshd.initd
+++ b/main/openssh/sshd.initd
@@ -78,7 +78,9 @@ stop() {
if [ "$RC_RUNLEVEL" = "shutdown" ]; then
ebegin "Shutting down ssh connections"
_sshd_pids=$(pgrep "${SSHD_BINARY##*/}: .* \[priv]")
- kill -TERM $_sshd_pids 2>&1 >/dev/null
+ if [ -n "$_sshd_pids" ]; then
+ kill -TERM $_sshd_pids >/dev/null 2>&1
+ fi
eend 0
fi
}