summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/restart/vpn/node.def5
-rw-r--r--templates/show/vpn/debug/detail/node.def3
-rw-r--r--templates/show/vpn/debug/node.def3
3 files changed, 7 insertions, 4 deletions
diff --git a/templates/restart/vpn/node.def b/templates/restart/vpn/node.def
index 1c9e4be..7cb9387 100644
--- a/templates/restart/vpn/node.def
+++ b/templates/restart/vpn/node.def
@@ -1,5 +1,6 @@
help: Restart IPsec VPN
-run: if [ -n "`ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/ipsec-interfaces/interface 2>/dev/null`" ] ; then
+run: if [ -n "$(cli-shell-api returnActiveValues \
+ vpn ipsec ipsec-interfaces interface)" ]; then
if pgrep pluto > /dev/null
then
/opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=clear-vpn-ipsec-process
@@ -8,4 +9,4 @@ run: if [ -n "`ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/ipsec-interfaces/in
fi
else
echo IPsec VPN not configured
- fi \ No newline at end of file
+ fi
diff --git a/templates/show/vpn/debug/detail/node.def b/templates/show/vpn/debug/detail/node.def
index 3ee980c..ee3604d 100644
--- a/templates/show/vpn/debug/detail/node.def
+++ b/templates/show/vpn/debug/detail/node.def
@@ -1,5 +1,6 @@
help: Show detailed VPN debugging information
-run: if [ -n "`ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/ipsec-interfaces/interface 2>/dev/null`" ] ; then
+run: if [ -n "$(cli-shell-api returnActiveValues \
+ vpn ipsec ipsec-interfaces interface)" ]; then
if pgrep pluto > /dev/null
then
/opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=show-vpn-debug-detail
diff --git a/templates/show/vpn/debug/node.def b/templates/show/vpn/debug/node.def
index b5848c6..7a33888 100644
--- a/templates/show/vpn/debug/node.def
+++ b/templates/show/vpn/debug/node.def
@@ -1,5 +1,6 @@
help: Show VPN debugging information
-run: if [ -n "`ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/ipsec-interfaces/interface 2>/dev/null`" ] ; then
+run: if [ -n "$(cli-shell-api returnActiveValues \
+ vpn ipsec ipsec-interfaces interface)" ]; then
if pgrep pluto > /dev/null
then
/opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=show-vpn-debug