summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-13 21:40:36 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-13 21:40:36 +0100
commit57fca79636b783dc4be2df1bc1ff12a0ce79d988 (patch)
tree5486dfa517bf26333c937bb75b2bab08a1cd5842 /src/conf_mode
parentb0c8bb556352d5953e22cc3db90fac5fdf699004 (diff)
downloadvyos-1x-57fca79636b783dc4be2df1bc1ff12a0ce79d988.tar.gz
vyos-1x-57fca79636b783dc4be2df1bc1ff12a0ce79d988.zip
ssh: T3212: do not make /run/sshd directory disappear on failure
Diffstat (limited to 'src/conf_mode')
-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 28e606663..8eeb0a7c1 100755
--- a/src/conf_mode/ssh.py
+++ b/src/conf_mode/ssh.py
@@ -77,10 +77,9 @@ def apply(ssh):
if not ssh:
# SSH access is removed in the commit
call('systemctl stop ssh.service')
+ return None
- if ssh:
- call('systemctl restart ssh.service')
-
+ call('systemctl restart ssh.service')
return None
if __name__ == '__main__':