From b958c75879d5b55524d90d856e3ae58ebfe32920 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Tue, 29 Mar 2005 02:53:31 +0000 Subject: Fix Frickin PPTP proxy bugs. --- packages/frickin.xml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'packages/frickin.xml') diff --git a/packages/frickin.xml b/packages/frickin.xml index 4fbe3ea4..4f59645e 100644 --- a/packages/frickin.xml +++ b/packages/frickin.xml @@ -32,24 +32,21 @@ - function write_frickin_static_config() { - $fout = fopen("/usr/local/etc/rc.d/frickin.sh", "w"); - fwrite($fout, "#!/bin/sh\n# This package was automatically generated\n# by the pfSense package system.\n\n"); - fwrite($fout, "/usr/local/bin/frickin "); - fclose($fout); - } function sync_package_frickin() { - $frickin_options = ""; - if($_POST['serveraddress'] != "") $frickin_options .= "-s {$_POST['serveraddress']} "; - if($_POST['maxtunnels'] != "") $frickin_options .= "-c {$_POST['maxtunnels']}"; - $fout = fopen("/usr/local/etc/rc.d/frickin.sh", "a"); - $fwrite($fout, $frickin_options . "\n"); + global $config; + $frickin_config = $config['installedpackages']['frickin']['config'][0]; + $fout = fopen("/usr/local/etc/rc.d/frickin.sh", "w"); + fwrite($fout, "#!/bin/sh\n# This package was automatically generated\n# by the pfSense package system.\n\n"); + fwrite($fout, "/usr/local/bin/frickin"); + if($frickin_config['serveraddress'] != "") fwrite($fout, " -s " . $frickin_config['serveraddress']); + if($frickin_config['maxtunnels'] != "") fwrite($fout, " -c " . $frickin_config['maxtunnels']); + fwrite($fout, "\n"); mwexec("/usr/bin/killall frickin"); mwexec("/usr/local/etc/rc.d/frickin.sh"); + fclose($fout); } - write_frickin_static_config(); sync_package_frickin(); -- cgit v1.2.3