summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-08-26 13:18:31 +0200
committerChristian Poessinger <christian@poessinger.com>2018-08-26 13:19:36 +0200
commitbc8b7305111d890e2933f06d72c60c0ab9258f0f (patch)
treeae0441595e89ef1209847510147334b597e36058 /src/conf_mode
parent211b762f9bdc5704e07638ac8f948277ef4f4319 (diff)
downloadvyos-1x-bc8b7305111d890e2933f06d72c60c0ab9258f0f.tar.gz
vyos-1x-bc8b7305111d890e2933f06d72c60c0ab9258f0f.zip
ssh.py: start/stop service via systemctl
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/ssh.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/ssh.py b/src/conf_mode/ssh.py
index f1ac19473..beca7bb9a 100755
--- a/src/conf_mode/ssh.py
+++ b/src/conf_mode/ssh.py
@@ -236,10 +236,10 @@ def generate(ssh):
def apply(ssh):
if ssh is not None and 'port' in ssh.keys():
- os.system("sudo systemctl restart ssh")
+ os.system("sudo systemctl restart ssh.service")
else:
# SSH access is removed in the commit
- os.system("sudo systemctl stop ssh")
+ os.system("sudo systemctl stop ssh.service")
os.unlink(config_file)
return None