diff options
Diffstat (limited to 'debian/openssh-server.postinst')
-rw-r--r-- | debian/openssh-server.postinst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 91c757db5..b35e227e7 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -304,6 +304,13 @@ if [ "$action" = configure ]; then | |||
304 | # restart it under Upstart. | 304 | # restart it under Upstart. |
305 | start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true | 305 | start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true |
306 | fi | 306 | fi |
307 | if dpkg --compare-versions "$2" lt 1:6.5p1-1 && \ | ||
308 | [ -d /run/systemd/system ] && \ | ||
309 | ! systemctl --quiet is-active ssh; then | ||
310 | # We must stop the sysvinit-controlled sshd before we can | ||
311 | # restart it under systemd. | ||
312 | start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true | ||
313 | fi | ||
307 | fi | 314 | fi |
308 | 315 | ||
309 | #DEBHELPER# | 316 | #DEBHELPER# |