From 9100ddd1059a048b2e0b3aff7d3a50a910e3b57c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 7 Nov 2008 09:58:32 -0800 Subject: Always restart ssh Need to do restart of ssh daemon. Rewriting config file is faster than checking --- templates/service/ssh/node.def | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'templates/service') diff --git a/templates/service/ssh/node.def b/templates/service/ssh/node.def index 585357dd..dbe32a6f 100644 --- a/templates/service/ssh/node.def +++ b/templates/service/ssh/node.def @@ -12,7 +12,5 @@ end: if [ -z "$VAR(port/@)" ]; then exit 0; fi; *) VER=2;; esac; STR="SSHD_OPTS=\"-p $VAR(port/@) -o Hostkey=/etc/ssh/ssh_host_key -o Protocol=${VER}\"" - if ! grep -q -s "^$STR" /etc/default/ssh; then - sudo sh -c "echo '$STR' > /etc/default/ssh" - sudo /usr/sbin/invoke-rc.d ssh restart - fi + sudo sh -c "echo '$STR' > /etc/default/ssh" + sudo /usr/sbin/invoke-rc.d ssh restart -- cgit v1.2.3