diff options
author | Colin Smith <colin@pfsense.org> | 2005-03-29 02:53:31 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-03-29 02:53:31 +0000 |
commit | b958c75879d5b55524d90d856e3ae58ebfe32920 (patch) | |
tree | 6cd43854b58e794c29862e5e76c3d8897b3111fd /packages/frickin.xml | |
parent | f999a56f56a4096f22f1559cb6baea55c0c48ce4 (diff) | |
download | pfsense-packages-b958c75879d5b55524d90d856e3ae58ebfe32920.tar.gz pfsense-packages-b958c75879d5b55524d90d856e3ae58ebfe32920.tar.bz2 pfsense-packages-b958c75879d5b55524d90d856e3ae58ebfe32920.zip |
Fix Frickin PPTP proxy bugs.
Diffstat (limited to 'packages/frickin.xml')
-rw-r--r-- | packages/frickin.xml | 21 |
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> |