summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-03-17 18:03:00 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-03-17 18:03:00 -0700
commit2905f0a42e31d8510a6ca9d5f0004e6171b3f819 (patch)
tree284ef9be8a4c426673f236ce870b9c3fb8df80d2 /templates
parent909b32e042719f7b1de5dd2e2f9e0d0a2ba5167c (diff)
downloadvyatta-op-vpn-2905f0a42e31d8510a6ca9d5f0004e6171b3f819.tar.gz
vyatta-op-vpn-2905f0a42e31d8510a6ca9d5f0004e6171b3f819.zip
Fix 2838: Clearing VPN process starts VPN , even if not configured.
- fix sloppy script which dies with "Unknown op" on valid ops. - use vyatta config rather than ipsec.conf to determine if running
Diffstat (limited to 'templates')
-rw-r--r--templates/clear/vpn/ipsec-process/node.def2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/clear/vpn/ipsec-process/node.def b/templates/clear/vpn/ipsec-process/node.def
index fd8ae72..d32af04 100644
--- a/templates/clear/vpn/ipsec-process/node.def
+++ b/templates/clear/vpn/ipsec-process/node.def
@@ -1,5 +1,5 @@
help: Restart VPN ipsec process
-run: if [ -f /etc/ipsec.conf ] && grep -q 'vyatta' /etc/ipsec.conf; then
+run: if [ -d $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/site-to-site/peer ] && [ -n `ls $VYATTA_ACTIVE_CONFIGURATION_DIR/vpn/ipsec/site-to-site/peer/` ] ; then
sudo /opt/vyatta/bin/sudo-users/vyatta-vpn-op.pl --op=clear-vpn-ipsec-process
else
echo VPN ipsec not configured