diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/siproxd.inc | 17 | ||||
-rw-r--r-- | config/siproxd.xml | 2 | ||||
-rw-r--r-- | config/siproxdusers.xml | 21 |
3 files changed, 20 insertions, 20 deletions
diff --git a/config/siproxd.inc b/config/siproxd.inc index fee47a90..be1ac196 100644 --- a/config/siproxd.inc +++ b/config/siproxd.inc @@ -27,6 +27,23 @@ POSSIBILITY OF SUCH DAMAGE. */ +function sync_package_sipproxd_users() { + conf_mount_rw(); + config_lock(); + global $config; + $fout = fopen("/usr/local/etc/siproxd_passwd.cfg","w"); + fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n"); + if($config['installedpackages']['siproxdusers']['config'] != "") { + foreach($config['installedpackages']['siproxdusers']['config'] as $rowhelper) { + fwrite($fout, $rowhelper['username'] . " " . $rowhelper['password'] . "\n"); + } + } + fclose($fout); + conf_mount_ro(); + config_unlock(); + system("/usr/bin/killall -HUP siproxd"); +} + function siproxd_generate_rules($type) { global $config; diff --git a/config/siproxd.xml b/config/siproxd.xml index deccf90d..c79c722f 100644 --- a/config/siproxd.xml +++ b/config/siproxd.xml @@ -44,7 +44,7 @@ <name>siproxdsettings</name> <version>0.5.13_pfs2</version> <title>siproxd: Settings</title> - <include_file>/usr/local/pkg/siproxd.inc</include_file> + <include_file>/usr/local/pkg/siproxd.inc</include_file> <aftersaveredirect>/pkg_edit.php?xml=siproxd.xml&id=0</aftersaveredirect> <menu> <name>siproxd</name> diff --git a/config/siproxdusers.xml b/config/siproxdusers.xml index a25418f9..a36e0554 100644 --- a/config/siproxdusers.xml +++ b/config/siproxdusers.xml @@ -48,6 +48,7 @@ <name>siproxdusers</name> <version>0.5.9</version> <title>siproxd: Users</title> + <include_file>/usr/local/pkg/siproxd.inc</include_file> <tabs> <tab> <text>Settings</text> @@ -91,27 +92,9 @@ </field> </fields> <custom_add_php_command> - function sync_package_sipproxd_users() - { - conf_mount_rw(); - config_lock(); - global $config; - $fout = fopen("/usr/local/etc/siproxd_passwd.cfg","w"); - fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n"); - if($config['installedpackages']['siproxdusers']['config'] != "") { - foreach($config['installedpackages']['siproxdusers']['config'] as $rowhelper) { - fwrite($fout, $rowhelper['username'] . " " . $rowhelper['password'] . "\n"); - } - } - fclose($fout); - conf_mount_ro(); - config_unlock(); - system("/usr/bin/killall -HUP siproxd"); - } sync_package_sipproxd_users(); </custom_add_php_command> <custom_php_resync_config_command> sync_package_sipproxd_users(); </custom_php_resync_config_command> -</packagegui> - +</packagegui>
\ No newline at end of file |