aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-30 19:17:33 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-30 19:17:33 -0400
commitfba73a26510e9811ac136c3a2433fe4b1727e6af (patch)
tree675218166a075401683906a50a611e1e8f2f21ed
parent554351180f3c06782293a8577cbbd1e55652651a (diff)
downloadpfsense-packages-fba73a26510e9811ac136c3a2433fe4b1727e6af.tar.gz
pfsense-packages-fba73a26510e9811ac136c3a2433fe4b1727e6af.tar.bz2
pfsense-packages-fba73a26510e9811ac136c3a2433fe4b1727e6af.zip
Title the connection correctly and pass a few Viscosity specific configuration items down
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index d955f520..5f15cfaf 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -295,8 +295,19 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead
$conf = openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoken);
if (!$conf)
return false;
+
+ $friendly_name = $settings['description'];
+ $visc_settings = <<<EOF
+#-- Config Auto Generated By pfSense for Viscosity --#
+
+#viscosity startonopen false
+#viscosity dhcp true
+#viscosity dnssupport true
+#viscosity name {$friendly_name}
+EOF;
+
$configfile = "{$tempdir}/config.conf";
- file_put_contents($configfile, $conf);
+ file_put_contents($configfile, $visc_settings . "\n" . $conf);
// write ca
$cafile = "{$tempdir}/{$prefix}-ca.crt";