aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-03-29 02:53:31 +0000
committerColin Smith <colin@pfsense.org>2005-03-29 02:53:31 +0000
commitb958c75879d5b55524d90d856e3ae58ebfe32920 (patch)
tree6cd43854b58e794c29862e5e76c3d8897b3111fd
parentf999a56f56a4096f22f1559cb6baea55c0c48ce4 (diff)
downloadpfsense-packages-b958c75879d5b55524d90d856e3ae58ebfe32920.tar.gz
pfsense-packages-b958c75879d5b55524d90d856e3ae58ebfe32920.tar.bz2
pfsense-packages-b958c75879d5b55524d90d856e3ae58ebfe32920.zip
Fix Frickin PPTP proxy bugs.
-rw-r--r--packages/frickin.xml21
1 files changed, 9 insertions, 12 deletions
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 @@
</field>
</fields>
<custom_php_global_functions>
- 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);
}
</custom_php_global_functions>
<custom_add_php_command>
- write_frickin_static_config();
sync_package_frickin();
</custom_add_php_command>
<custom_php_deinstall_command>