diff options
Diffstat (limited to 'packages/siproxd.xml')
-rw-r--r-- | packages/siproxd.xml | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/packages/siproxd.xml b/packages/siproxd.xml index 04d91108..a9a9b198 100644 --- a/packages/siproxd.xml +++ b/packages/siproxd.xml @@ -21,6 +21,11 @@ <url>/pkg.php?xml=siproxdusers.xml</url> </tab> </tabs> + <service> + <name>siproxd</name> + <rcfile>siproxd.sh</rcfile> + <executable>siproxd</executable> + </service> <additional_files_needed> <item>http://www.pfsense.com/packages/config/siproxdusers.xml</item> </additional_files_needed> @@ -103,19 +108,12 @@ <description>Enter the port of the outbound proxy to send all traffic to. This is only useful if you have multiple masquerading firewalls to cross.</description> </field> </fields> - <custom_php_install_command> - $fout = fopen("/usr/local/etc/rc.d/siproxd.sh","w"); - fwrite($fout, "# PACKAGE: siproxd\n"); - fwrite($fout, "# EXECUTABLE: siproxd\n"); - fwrite($fout, "#!/bin/sh\n\n/usr/local/sbin/siproxd\n"); - fclose($fout); - </custom_php_install_command> <custom_php_global_functions> - function sync_package_sipproxd() { + function sync_package_sipproxd() { conf_mount_rw(); config_lock(); global $config; - if ($_POST == "") $_POST = $config['installedpackages']['siproxd']['config']; + $conf =& $config['installedpackages']['siproxd']['config'][0]; $fout = fopen("/usr/local/etc/siproxd.conf","w"); fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n"); if($_POST['if_inbound'] != "") { @@ -167,9 +165,13 @@ _file = siproxd_registrations\n\npid_file = siproxd.pid\n\n"); } } fclose($fout); - mwexec("killall siproxd"); - mwexec("/usr/local/etc/rc.d/siproxd.sh"); - conf_mount_ro(); + write_rcfile(array( + "file" => "siproxd.sh", + "start" => "/usr/local/sbin/siproxd" + ) + ); + restart_service("siproxd"); + conf_mount_ro(); config_unlock(); } </custom_php_global_functions> |