blob: ce6f957780e4d9f7a3f82e344562bfd5e6a9f934 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/perl -w
use strict;
use lib "/opt/vyatta/share/perl5/";
use Getopt::Long;
my $op='';
GetOptions("op=s" => \$op);
if ($op eq '') {
die 'No op specified';
}
if ($op eq 'clear-vpn-ipsec-process') {
system '/usr/sbin/ipsec setup restart';
exit 0;
}
if ($op eq 'show-vpn-debug') {
system '/usr/sbin/ipsec auto --status';
exit 0;
}
if ($op eq 'show-vpn-debug-detail') {
system '/usr/sbin/ipsec barf';
exit 0;
}
die "Unknown op: $op";
|