summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/vpn-config.pl7
-rw-r--r--templates/vpn/ipsec/include-ipsec-secrets/node.def2
2 files changed, 9 insertions, 0 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl
index dd14446..a238d20 100755
--- a/scripts/vpn-config.pl
+++ b/scripts/vpn-config.pl
@@ -1119,12 +1119,19 @@ if ($vcVPN->exists('ipsec')) {
# Include a custom configuration file
#
my $custom_include = $vcVPN->returnValue("ipsec include-ipsec-conf");
+ my $custom_secrets = $vcVPN->returnValue("ipsec include-ipsec-secrets");
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.");
}
$genout .= "\ninclude $custom_include";
}
+ if (defined($custom_secrets)) {
+ if ( ! -e $custom_secrets) {
+ vpn_die(["vpn","ipsec","include-ipsec-secrets"],"$vpn_cfg_err The specified file for inclusion inside ipsec.secrets does not exist.");
+ }
+ $genout_secrets .= "\ninclude $custom_secrets\n";
+ }
if (-e '/etc/dmvpn.conf') {
$genout .= "\ninclude /etc/dmvpn.conf\n";
}
diff --git a/templates/vpn/ipsec/include-ipsec-secrets/node.def b/templates/vpn/ipsec/include-ipsec-secrets/node.def
new file mode 100644
index 0000000..37b73e1
--- /dev/null
+++ b/templates/vpn/ipsec/include-ipsec-secrets/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: Sets to include an additional secrets file for strongSwan. Use an absolute path to specify the included file.