diff options
Diffstat (limited to 'debian/openssh-server.if-up')
-rw-r--r-- | debian/openssh-server.if-up | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/debian/openssh-server.if-up b/debian/openssh-server.if-up index de92866e6..dd05ea51c 100644 --- a/debian/openssh-server.if-up +++ b/debian/openssh-server.if-up | |||
@@ -30,8 +30,14 @@ if [ ! -f /var/run/sshd.pid ] || \ | |||
30 | exit 0 | 30 | exit 0 |
31 | fi | 31 | fi |
32 | 32 | ||
33 | # We'd like to use 'reload' here, but it has some problems; see | 33 | # We'd like to use 'reload' here, but it has some problems; see #502444. On |
34 | # #502444. | 34 | # the other hand, repeated restarts of ssh make systemd unhappy |
35 | invoke-rc.d ssh restart >/dev/null 2>&1 || true | 35 | # (#756547/#757822), so use reload in that case. |
36 | if [ -d /run/systemd/system ]; then | ||
37 | action=reload | ||
38 | else | ||
39 | action=restart | ||
40 | fi | ||
41 | invoke-rc.d ssh $action >/dev/null 2>&1 || true | ||
36 | 42 | ||
37 | exit 0 | 43 | exit 0 |