From a64d08fe6cfbc6275c2682fbe92d4856334deec2 Mon Sep 17 00:00:00 2001 From: Jeff Leung Date: Thu, 5 Feb 2015 06:26:36 +0000 Subject: Allow users to specify a custom file to be included with ipsec.conf --- scripts/vpn-config.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scripts/vpn-config.pl') diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl index b974a5a..7dd18f1 100755 --- a/scripts/vpn-config.pl +++ b/scripts/vpn-config.pl @@ -1160,6 +1160,16 @@ if ($vcVPN->exists('ipsec')) { } } } + + # + # Include a custom configuration file + # + my $custom_include = $vcVPN->returnValue("ipsec include-ipsec-conf"); + if (defined($custom_include)) { + if ( ! -e $custom_include ) { + vpn_die(["vpn","ipsec","include-ipsec-conf"],"$vpn_cfg_err The specified file for inclusion inside ipsec.conf does not exist."); + } + } if (-e '/etc/dmvpn.conf') { $genout .= "\ninclude /etc/dmvpn.conf\n"; } -- cgit v1.2.3