diff options
Diffstat (limited to 'scripts/vpn-config.pl')
-rwxr-xr-x | scripts/vpn-config.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl index d686b66..fb8aa29 100755 --- a/scripts/vpn-config.pl +++ b/scripts/vpn-config.pl @@ -81,7 +81,7 @@ $genout_secrets .= "# using 'new config' directory: $vcVPN->{_new_config_di $vcVPN->setLevel('vpn'); -if ($vcVPN->exists('.')) { +if ($vcVPN->exists('ipsec')) { # # Check that ESP groups have been specified @@ -725,7 +725,8 @@ if (!(defined($config_file) && ($config_file ne '') && defined($secrets_file) && if ($error == 0) { - if ($vcVPN->isDeleted('.') || !$vcVPN->exists('.')) { + if ($vcVPN->isDeleted('.') || !$vcVPN->exists('.') + || $vcVPN->isDeleted('ipsec') || !$vcVPN->exists('ipsec')) { if (VyattaVPNUtil::is_vpn_running()) { vpn_exec('ipsec setup --stop', 'stop ipsec'); } |