summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-07 23:22:58 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-07 23:23:40 +0100
commitdcdc4f3ea27f1a26f8baa6b72b51c7911f21e6ba (patch)
treeba424b887b447fdc92e44fd52df13c02b33b2608 /src
parent65ee3a66077c7708f366d9492033634024887545 (diff)
downloadvyos-1x-dcdc4f3ea27f1a26f8baa6b72b51c7911f21e6ba.tar.gz
vyos-1x-dcdc4f3ea27f1a26f8baa6b72b51c7911f21e6ba.zip
ssh: T2635: harden Jinja2 template and daemon startup
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/ssh.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/conf_mode/ssh.py b/src/conf_mode/ssh.py
index 07c057fd7..28e606663 100755
--- a/src/conf_mode/ssh.py
+++ b/src/conf_mode/ssh.py
@@ -68,6 +68,8 @@ def generate(ssh):
render(config_file, 'ssh/sshd_config.tmpl', ssh)
render(systemd_override, 'ssh/override.conf.tmpl', ssh)
+ # Reload systemd manager configuration
+ call('systemctl daemon-reload')
return None
@@ -76,9 +78,6 @@ def apply(ssh):
# SSH access is removed in the commit
call('systemctl stop ssh.service')
- # Reload systemd manager configuration
- call('systemctl daemon-reload')
-
if ssh:
call('systemctl restart ssh.service')