Commit ae99c382 authored by Natanael Copa's avatar Natanael Copa

main/openssh: kill current ssh sessions on stop

parent fbf7423a
......@@ -2,7 +2,7 @@
pkgname=openssh
pkgver=5.4_p1
_myver=${pkgver%_*}${pkgver#*_}
pkgrel=0
pkgrel=1
pkgdesc="Port of OpenBSD's free SSH release"
url="http://www.openssh.org/portable.html"
license="as-is"
......@@ -63,5 +63,5 @@ client() {
}
md5sums="da10af8a789fa2e83e3635f3a1b76f5e openssh-5.4p1.tar.gz
d993cc91e9fab6c6012390874c28af0a sshd.initd
e11f44a4c47135484ac750d52855f846 sshd.initd
b35e9f3829f4cfca07168fcba98749c7 sshd.confd"
......@@ -63,6 +63,7 @@ start() {
}
stop() {
local rc=
if [ "${RC_CMD}" = "restart" ] ; then
checkconfig || return 1
fi
......@@ -70,7 +71,14 @@ stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --exec "${SSHD_BINARY}" \
--pidfile "${SSHD_PIDFILE}" --quiet
eend $?
rc=$?
eend $rc
if [ "${RC_CMD}" = "stop" ]; then
# kill sessions on shutdown but not on restart
killall -q sshd &
fi
return $rc
}
reload() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment