summaryrefslogtreecommitdiff
path: root/src/op_mode/vpn_ike_sa.py
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2021-06-22 08:44:34 +0200
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2021-06-22 09:43:27 +0200
commita1aaf4fb9c0e4111670ef3dd491796fa35a2311f (patch)
tree396ad5c771364208958a188febafb43e98a24e95 /src/op_mode/vpn_ike_sa.py
parent3ae265b300544b855b1b32862c901045ee146934 (diff)
downloadvyos-1x-a1aaf4fb9c0e4111670ef3dd491796fa35a2311f.tar.gz
vyos-1x-a1aaf4fb9c0e4111670ef3dd491796fa35a2311f.zip
ipsec: T3643: T2816: Update IPSec VPN op-mode commands
Diffstat (limited to 'src/op_mode/vpn_ike_sa.py')
-rwxr-xr-xsrc/op_mode/vpn_ike_sa.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/op_mode/vpn_ike_sa.py b/src/op_mode/vpn_ike_sa.py
index 622498a7f..00f34564a 100755
--- a/src/op_mode/vpn_ike_sa.py
+++ b/src/op_mode/vpn_ike_sa.py
@@ -16,8 +16,11 @@
import argparse
import re
+import sys
import vici
+from vyos.util import process_named_running
+
ike_sa_peer_prefix = """\
Peer ID / IP Local ID / IP
------------ -------------"""
@@ -67,4 +70,8 @@ if __name__ == '__main__':
args = parser.parse_args()
- ike_sa(args.peer, args.nat) \ No newline at end of file
+ if not process_named_running('charon'):
+ print("IPSec Process NOT Running")
+ sys.exit(0)
+
+ ike_sa(args.peer, args.nat)