summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Hall <halex@cvs.openbsd.org>2013-02-05 00:26:32 +0000
committerAlexander Hall <halex@cvs.openbsd.org>2013-02-05 00:26:32 +0000
commitfa6c1e626a859e27ba1b4af7abeae2e753b1b4b0 (patch)
tree1a6b8b182afdf0d6a43d828b21b0ed69355d32ee
parentf5f279226dc80c377bf61a1325af7fe5b3977ad9 (diff)
Make sure new config is valid before SIGHUP'ing sshd, which would
otherwise just kill it. ok ajacoutot@ djm@ pirofti@, quite some time ago
-rw-r--r--etc/rc.d/sshd6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/rc.d/sshd b/etc/rc.d/sshd
index 46aef9085b0..dc3d58d506a 100644
--- a/etc/rc.d/sshd
+++ b/etc/rc.d/sshd
@@ -1,9 +1,13 @@
#!/bin/sh
#
-# $OpenBSD: sshd,v 1.1 2011/07/06 18:55:36 robert Exp $
+# $OpenBSD: sshd,v 1.2 2013/02/05 00:26:31 halex Exp $
daemon="/usr/sbin/sshd"
. /etc/rc.d/rc.subr
+rc_reload() {
+ ${daemon} ${daemon_flags} -t && pkill -HUP -f "^${pexp}"
+}
+
rc_cmd $1