summaryrefslogtreecommitdiff
path: root/debian/openssh-server.if-up
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-08-13 00:59:50 +0100
committerColin Watson <cjwatson@debian.org>2014-08-13 00:59:50 +0100
commit3ddd27842dfe7f5dd40feabf19cdc2cc7950c700 (patch)
tree69dd2f167e2f6ca839e6c8d7d97360dffa8e4fc4 /debian/openssh-server.if-up
parenta36afb47e9be44471875bf074f49fb862fdb884c (diff)
Make the if-up hook use "reload" rather than "restart" if the system was booted using systemd (closes: #756547).
Diffstat (limited to 'debian/openssh-server.if-up')
-rw-r--r--debian/openssh-server.if-up12
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
31fi 31fi
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
35invoke-rc.d ssh restart >/dev/null 2>&1 || true 35# (#756547/#757822), so use reload in that case.
36if [ -d /run/systemd/system ]; then
37 action=reload
38else
39 action=restart
40fi
41invoke-rc.d ssh $action >/dev/null 2>&1 || true
36 42
37exit 0 43exit 0