diff options
-rw-r--r-- | debian/openssh-server.postinst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 60f88faf8..d4c1a4ddf 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -304,12 +304,6 @@ 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-3 && \ | ||
308 | [ -d /run/systemd/system ]; then | ||
309 | # We must stop the sysvinit-controlled sshd before we can | ||
310 | # restart it under systemd. | ||
311 | start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd || true | ||
312 | fi | ||
313 | if dpkg --compare-versions "$2" lt 1:6.5p1-2 && \ | 307 | if dpkg --compare-versions "$2" lt 1:6.5p1-2 && \ |
314 | deb-systemd-helper debian-installed ssh.socket && \ | 308 | deb-systemd-helper debian-installed ssh.socket && \ |
315 | deb-systemd-helper --quiet was-enabled ssh.service && \ | 309 | deb-systemd-helper --quiet was-enabled ssh.service && \ |
@@ -318,6 +312,12 @@ if [ "$action" = configure ]; then | |||
318 | # enabled. | 312 | # enabled. |
319 | deb-systemd-helper disable ssh.socket >/dev/null || true | 313 | deb-systemd-helper disable ssh.socket >/dev/null || true |
320 | fi | 314 | fi |
315 | if dpkg --compare-versions "$2" lt 1:6.5p1-3 && \ | ||
316 | [ -d /run/systemd/system ]; then | ||
317 | # We must stop the sysvinit-controlled sshd before we can | ||
318 | # restart it under systemd. | ||
319 | start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd || true | ||
320 | fi | ||
321 | fi | 321 | fi |
322 | 322 | ||
323 | #DEBHELPER# | 323 | #DEBHELPER# |