summaryrefslogtreecommitdiff
path: root/templates/show/vpn/ipsec/status
diff options
context:
space:
mode:
Diffstat (limited to 'templates/show/vpn/ipsec/status')
-rw-r--r--templates/show/vpn/ipsec/status/node.def7
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/show/vpn/ipsec/status/node.def b/templates/show/vpn/ipsec/status/node.def
index ac82328..4611fdd 100644
--- a/templates/show/vpn/ipsec/status/node.def
+++ b/templates/show/vpn/ipsec/status/node.def
@@ -1,2 +1,7 @@
help: Show status of IPsec process
-run: sudo /opt/vyatta/bin/sudo-users/command_proc_show_vpn show_vpn_ipsec_status.xsl
+run: sudo /opt/vyatta/bin/sudo-users/command_proc_show_vpn show_vpn_ipsec_status.xsl
+ if pgrep pluto >&/dev/null; then
+ active_tunnels=`ipsec status 2> /dev/null | grep -i "ipsec sa established" | wc -l | sed s/\ //g`
+ echo "$active_tunnels Active IPsec Tunnels"
+ echo
+ fi