diff options
Diffstat (limited to 'main/openssh/sshd.initd')
-rw-r--r-- | main/openssh/sshd.initd | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/openssh/sshd.initd b/main/openssh/sshd.initd index 477cdbc619f..2221d0f7c44 100644 --- a/main/openssh/sshd.initd +++ b/main/openssh/sshd.initd @@ -50,7 +50,7 @@ generate_host_keys() { } get_conf() { - awk "/^$1/{ print \$2 }" "$cfgfile" 2>/dev/null + awk "/^$1\s/{ print \$2; exit }" "$cfgfile" /etc/ssh/sshd_config.d/*.conf 2>/dev/null } conf_enabled() { @@ -131,7 +131,7 @@ stop_pre() { stop_post() { if [ "$RC_RUNLEVEL" = "shutdown" ]; then - _sshd_pids=$(pgrep "${command##*/}") + _sshd_pids=$(pgrep "${command##*/}:") if [ -n "$_sshd_pids" ]; then ebegin "Shutting down ssh connections" # shellcheck disable=SC2086 |