diff options
author | Colin Smith <colin@pfsense.org> | 2005-09-12 02:44:23 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-09-12 02:44:23 +0000 |
commit | 3dbed7fd9bdbaf101b4fd2f85ad1b00cc2ef249c (patch) | |
tree | ff4afbeb86e4dcb2421e4b586c9745b60c4994d5 | |
parent | 10de8a046aa8ac3a2b2fe1e26743861d635b50b4 (diff) | |
download | pfsense-packages-3dbed7fd9bdbaf101b4fd2f85ad1b00cc2ef249c.tar.gz pfsense-packages-3dbed7fd9bdbaf101b4fd2f85ad1b00cc2ef249c.tar.bz2 pfsense-packages-3dbed7fd9bdbaf101b4fd2f85ad1b00cc2ef249c.zip |
Clean up a little.
-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> |