summaryrefslogtreecommitdiff
path: root/scripts/vyatta-vpn-ppp-updown.pl
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@ubnt.com>2014-01-13 11:01:40 -0800
committerDaniil Baturin <daniil@baturin.org>2014-01-29 04:24:09 +0100
commit4ec3bfc18747fcef6bedb8906e3825d0e21be4a7 (patch)
treeeffc750d2cbeecc7531a62553efc1b9aa3e09a0d /scripts/vyatta-vpn-ppp-updown.pl
parentb321dc01f533b0ed7359327a2b3bd53b583155b8 (diff)
downloadvyatta-cfg-vpn-4ec3bfc18747fcef6bedb8906e3825d0e21be4a7.tar.gz
vyatta-cfg-vpn-4ec3bfc18747fcef6bedb8906e3825d0e21be4a7.zip
Fix vpn ppp up script
Signed-off-by: Daniil Baturin <daniil@baturin.org>
Diffstat (limited to 'scripts/vyatta-vpn-ppp-updown.pl')
-rwxr-xr-xscripts/vyatta-vpn-ppp-updown.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/vyatta-vpn-ppp-updown.pl b/scripts/vyatta-vpn-ppp-updown.pl
index 3150061..bde1f02 100755
--- a/scripts/vyatta-vpn-ppp-updown.pl
+++ b/scripts/vyatta-vpn-ppp-updown.pl
@@ -162,12 +162,12 @@ $cmd = "mv $tmp_conf $conf_file";
$rc =system($cmd);
logit("$cmd = $rc");
my $update_interval = `cli-shell-api returnActiveValue vpn ipsec auto-update`;
-if ($update_interval = ''){
- $cmd = "/usr/sbin/ipsec start 2> /dev/null";
+if ($update_interval == ''){
+ $cmd = "/usr/sbin/ipsec restart 2> /dev/null";
$rc =system($cmd);
logit("$cmd = $rc");
} else {
- $cmd = "/usr/sbin/ipsec start --auto-update ".$update_interval." 2> /dev/null";
+ $cmd = "/usr/sbin/ipsec restart --auto-update ".$update_interval." 2> /dev/null";
$rc =system($cmd);
logit("$cmd = $rc");
}