From 5b5e74fb667fa5a5abec779b6c411b3864f3b5fb Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Tue, 18 May 2021 20:08:47 +0000 Subject: openconnect-server: T3559: Add restart op-command --- op-mode-definitions/openconnect.xml.in | 10 ++++++++++ src/op_mode/openconnect-control.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/op-mode-definitions/openconnect.xml.in b/op-mode-definitions/openconnect.xml.in index 36f23239e..6b0082b4c 100644 --- a/op-mode-definitions/openconnect.xml.in +++ b/op-mode-definitions/openconnect.xml.in @@ -17,4 +17,14 @@ + + + + + Restart openconnect server process + + ${vyos_op_scripts_dir}/openconnect-control.py --action="restart" + + + diff --git a/src/op_mode/openconnect-control.py b/src/op_mode/openconnect-control.py index ef9fe618c..c3cd25186 100755 --- a/src/op_mode/openconnect-control.py +++ b/src/op_mode/openconnect-control.py @@ -58,7 +58,7 @@ def main(): is_ocserv_configured() if args.action == "restart": - run("systemctl restart ocserv") + run("sudo systemctl restart ocserv.service") sys.exit(0) elif args.action == "show_sessions": show_sessions() -- cgit v1.2.3