diff options
author | Marat Nepomnyashy <marat@vyatta.com> | 2008-02-22 16:15:51 -0800 |
---|---|---|
committer | Marat Nepomnyashy <marat@vyatta.com> | 2008-02-22 16:15:51 -0800 |
commit | a4f68f371730e3d55e72ece0532635aaf8553763 (patch) | |
tree | 831fa62ea2be043561f59c1f3b8e66b38c4810bd /scripts | |
parent | 36b18f78e0a142fb5d2bfed34af89f0001ec8005 (diff) | |
download | vyatta-op-vpn-a4f68f371730e3d55e72ece0532635aaf8553763.tar.gz vyatta-op-vpn-a4f68f371730e3d55e72ece0532635aaf8553763.zip |
Fixed-up operator commands 'clear vpn ipsec-process' and 'show vpn debug detail' so that they no longer require sudo password.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-show-vpn-debug.pl | 3 | ||||
-rwxr-xr-x | scripts/vyatta-vpn-op.pl | 21 |
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'; +} + + |