summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-show-vpn-debug.pl3
-rwxr-xr-xscripts/vyatta-vpn-op.pl21
2 files changed, 21 insertions, 3 deletions
diff --git a/scripts/vyatta-show-vpn-debug.pl b/scripts/vyatta-show-vpn-debug.pl
deleted file mode 100755
index 3a419a7..0000000
--- a/scripts/vyatta-show-vpn-debug.pl
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/perl
-
-system '/usr/sbin/ipsec auto --status'
diff --git a/scripts/vyatta-vpn-op.pl b/scripts/vyatta-vpn-op.pl
new file mode 100755
index 0000000..bd785e2
--- /dev/null
+++ b/scripts/vyatta-vpn-op.pl
@@ -0,0 +1,21 @@
+#!/usr/bin/perl -w
+
+use strict;
+use lib "/opt/vyatta/share/perl5/";
+
+use Getopt::Long;
+my $op;
+GetOptions("op=s" => \$op);
+
+if ($op eq 'show-vpn-debug') {
+ system '/usr/sbin/ipsec auto --status';
+}
+if ($op eq 'show-vpn-debug-detail') {
+ system '/usr/sbin/ipsec barf';
+}
+
+if ($op eq 'clear-vpn-ipsec-process') {
+ system '/usr/sbin/ipsec setup restart';
+}
+
+