summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/vyatta-vpn-op.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/vyatta-vpn-op.pl b/scripts/vyatta-vpn-op.pl
index adcbf84..dca623a 100755
--- a/scripts/vyatta-vpn-op.pl
+++ b/scripts/vyatta-vpn-op.pl
@@ -63,7 +63,12 @@ if ($op eq '') {
if ($op eq 'clear-vpn-ipsec-process') {
print "Clearing IPsec process...\n";
- system 'sudo /usr/sbin/ipsec restart >&/dev/null';
+ my $update_interval = `cli-shell-api returnActiveValue vpn ipsec auto-update`;
+ if ($update_interval eq ''){
+ system 'sudo /usr/sbin/ipsec restart >&/dev/null';
+ } else {
+ system 'sudo /usr/sbin/ipsec restart --auto-update '.$update_interval.' >&/dev/null';
+ }
} elsif ($op eq 'show-vpn-debug') {
system 'sudo /usr/sbin/ipsec statusall';