summaryrefslogtreecommitdiff
path: root/templates/show
diff options
context:
space:
mode:
authorKim Hagen <kim.sidney@gmail.com>2016-09-15 11:40:03 +0200
committerKim Hagen <kim.sidney@gmail.com>2016-09-15 11:40:03 +0200
commit33e24e989996ec809e1be696866258ce987cc527 (patch)
tree80aa6b83551dd536412fc4629d4362072b7f52ba /templates/show
parent8a80669f305983de512466e3e2bad0924d7f37a0 (diff)
downloadvyatta-op-vpn-33e24e989996ec809e1be696866258ce987cc527.tar.gz
vyatta-op-vpn-33e24e989996ec809e1be696866258ce987cc527.zip
Reimplementation of TriJetScud's commit:578688a25ba784d839512fefafab4cabdaf32fc5.
Simpilfy the operational commands Instead of trying to parse the outout of ipsec or swanctl, just dump whatever swanctl outputs.
Diffstat (limited to 'templates/show')
-rw-r--r--templates/show/vpn/ipsec/sa/detail/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/detail/peer/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/detail/profile/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/nat-traversal/node.def.in2
-rw-r--r--templates/show/vpn/ipsec/sa/node.def6
-rw-r--r--templates/show/vpn/ipsec/sa/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/peer/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/profile/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/peer/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/profile/node.tag/node.def.in3
-rw-r--r--templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.tag/node.def.in3
17 files changed, 6 insertions, 47 deletions
diff --git a/templates/show/vpn/ipsec/sa/detail/node.def.in b/templates/show/vpn/ipsec/sa/detail/node.def.in
deleted file mode 100644
index 781d61b..0000000
--- a/templates/show/vpn/ipsec/sa/detail/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show details for all active IPsec Security Associations (SA)
-run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-detail
- sudo @SUDOUSRDIR@/vyatta-op-vpnprof.pl --show-ipsec-sa-detail
diff --git a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/detail/peer/node.tag/node.def.in
deleted file mode 100644
index 659acfa..0000000
--- a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show details for all active IPsec Security Associations (SA) for a peer
-allowed: @SUDOUSRDIR@/vyatta-op-vpn.pl --get-peers-for-cli
-run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-peer-detail="$7"
diff --git a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.tag/node.def.in
deleted file mode 100644
index 5c121c3..0000000
--- a/templates/show/vpn/ipsec/sa/detail/peer/node.tag/tunnel/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show details for the active IPsec Security Associations (SA) for a peer's tunnel
-allowed: @SUDOUSRDIR@/vyatta-op-vpn.pl --get-conn-for-cli=${COMP_WORDS[6]}
-run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-conn-detail $7 $9
diff --git a/templates/show/vpn/ipsec/sa/detail/profile/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/detail/profile/node.tag/node.def.in
deleted file mode 100644
index bcbc520..0000000
--- a/templates/show/vpn/ipsec/sa/detail/profile/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show details for all active IPsec Security Associations (SA) for a profile
-allowed: @SUDOUSRDIR@/vyatta-op-vpnprof.pl --get-profiles-for-cli
-run: sudo @SUDOUSRDIR@/vyatta-op-vpnprof.pl --show-ipsec-sa-profile-detail="$7"
diff --git a/templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.tag/node.def.in
deleted file mode 100644
index e31b008..0000000
--- a/templates/show/vpn/ipsec/sa/detail/profile/node.tag/tunnel/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show details for the active IPsec Security Associations (SA) for a tunnel bound to profile
-allowed: @SUDOUSRDIR@/vyatta-op-vpnprof.pl --get-conn-for-cli=${COMP_WORDS[6]}
-run: sudo @SUDOUSRDIR@/vyatta-op-vpnprof.pl --show-ipsec-sa-conn-detail $7 $9
diff --git a/templates/show/vpn/ipsec/sa/nat-traversal/node.def.in b/templates/show/vpn/ipsec/sa/nat-traversal/node.def.in
deleted file mode 100644
index f3bbe87..0000000
--- a/templates/show/vpn/ipsec/sa/nat-traversal/node.def.in
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Show all active IPsec Security Associations (SA) that are using NAT Traversal
-run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-natt
diff --git a/templates/show/vpn/ipsec/sa/node.def b/templates/show/vpn/ipsec/sa/node.def
new file mode 100644
index 0000000..99a5cc1
--- /dev/null
+++ b/templates/show/vpn/ipsec/sa/node.def
@@ -0,0 +1,6 @@
+help: Show all active IPsec Security Associations (SA)
+run: if pgrep charon >&/dev/null; then
+ sudo /usr/sbin/swanctl --list-sas
+ else
+ echo -e "IPSec Process NOT Running\n"
+ fi
diff --git a/templates/show/vpn/ipsec/sa/node.def.in b/templates/show/vpn/ipsec/sa/node.def.in
deleted file mode 100644
index 036a1d7..0000000
--- a/templates/show/vpn/ipsec/sa/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show all active IPsec Security Associations (SA)
-run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa
- sudo @SUDOUSRDIR@/vyatta-op-vpnprof.pl --show-ipsec-sa
diff --git a/templates/show/vpn/ipsec/sa/peer/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/peer/node.tag/node.def.in
deleted file mode 100644
index 1cae596..0000000
--- a/templates/show/vpn/ipsec/sa/peer/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show all active IPsec Security Associations (SA) for a peer
-allowed: @SUDOUSRDIR@/vyatta-op-vpn.pl --get-peers-for-cli
-run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-peer="$6"
diff --git a/templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.tag/node.def.in
deleted file mode 100644
index 8cc8a9c..0000000
--- a/templates/show/vpn/ipsec/sa/peer/node.tag/tunnel/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show the active IPsec Security Association (SA) for a peer's tunnel
-allowed: @SUDOUSRDIR@/vyatta-op-vpn.pl --get-conn-for-cli=${COMP_WORDS[5]}
-run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-conn $6 $8
diff --git a/templates/show/vpn/ipsec/sa/profile/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/profile/node.tag/node.def.in
deleted file mode 100644
index 30ed853..0000000
--- a/templates/show/vpn/ipsec/sa/profile/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show all active IPsec Security Associations (SA) for a profile
-allowed: @SUDOUSRDIR@/vyatta-op-vpnprof.pl --get-profiles-for-cli
-run: sudo @SUDOUSRDIR@/vyatta-op-vpnprof.pl --show-ipsec-sa-profile="$6"
diff --git a/templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.tag/node.def.in
deleted file mode 100644
index 3d643bc..0000000
--- a/templates/show/vpn/ipsec/sa/profile/node.tag/tunnel/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show the active IPsec Security Association (SA) for a profile's tunnel
-allowed: @SUDOUSRDIR@/vyatta-op-vpnprof.pl --get-conn-for-cli=${COMP_WORDS[5]}
-run: sudo @SUDOUSRDIR@/vyatta-op-vpnprof.pl --show-ipsec-sa-conn $6 $8
diff --git a/templates/show/vpn/ipsec/sa/statistics/node.def.in b/templates/show/vpn/ipsec/sa/statistics/node.def.in
deleted file mode 100644
index 5832f1a..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show statistics of all active tunnels that have IPsec Security Associations (SA)
-run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-stats
- sudo @SUDOUSRDIR@/vyatta-op-vpnprof.pl --show-ipsec-sa-stats
diff --git a/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/node.def.in
deleted file mode 100644
index 8b72451..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show stats for all active IPsec Security Associations (SA) for a peer
-allowed: @SUDOUSRDIR@/vyatta-op-vpn.pl --get-peers-for-cli
-run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-stats-peer="$7"
diff --git a/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.tag/node.def.in
deleted file mode 100644
index 6566a44..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/peer/node.tag/tunnel/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show stats for the active IPsec Security Association (SA) for a peer's tunnel
-allowed: @SUDOUSRDIR@/vyatta-op-vpn.pl --get-conn-for-cli=${COMP_WORDS[6]}
-run: sudo @SUDOUSRDIR@/vyatta-op-vpn.pl --show-ipsec-sa-stats-conn $7 $9
diff --git a/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/node.def.in
deleted file mode 100644
index 1bc76d6..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show stats for all active IPsec Security Associations (SA) for a profile
-allowed: @SUDOUSRDIR@/vyatta-op-vpnprof.pl --get-profiles-for-cli
-run: sudo @SUDOUSRDIR@/vyatta-op-vpnprof.pl --show-ipsec-sa-stats-profile="$7"
diff --git a/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.tag/node.def.in b/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.tag/node.def.in
deleted file mode 100644
index 9ae35c8..0000000
--- a/templates/show/vpn/ipsec/sa/statistics/profile/node.tag/tunnel/node.tag/node.def.in
+++ /dev/null
@@ -1,3 +0,0 @@
-help: Show stats for the active IPsec Security Association (SA) for a tunnel bound to profile
-allowed: @SUDOUSRDIR@/vyatta-op-vpnprof.pl --get-conn-for-cli=${COMP_WORDS[6]}
-run: sudo @SUDOUSRDIR@/vyatta-op-vpnprof.pl --show-ipsec-sa-stats-conn $7 $9