diff options
author | Colin Smith <colin@pfsense.org> | 2005-02-27 05:19:42 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-02-27 05:19:42 +0000 |
commit | 41b283933426ebfe07fd6039e6ed7a9d5f04a43a (patch) | |
tree | fd061e78b89a0753d91f320772e447aa91e8051d /packages/siproxdusers.xml | |
parent | df45cb96bc0e6ae16e514c6e2bbcfee69bd4e8e2 (diff) | |
download | pfsense-packages-41b283933426ebfe07fd6039e6ed7a9d5f04a43a.tar.gz pfsense-packages-41b283933426ebfe07fd6039e6ed7a9d5f04a43a.tar.bz2 pfsense-packages-41b283933426ebfe07fd6039e6ed7a9d5f04a43a.zip |
Add siproxd package.
Diffstat (limited to 'packages/siproxdusers.xml')
-rw-r--r-- | packages/siproxdusers.xml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/packages/siproxdusers.xml b/packages/siproxdusers.xml new file mode 100644 index 00000000..9209bf84 --- /dev/null +++ b/packages/siproxdusers.xml @@ -0,0 +1,68 @@ +<packagegui> + <name>siproxdusers</name> + <version>0.5.9</version> + <title>siproxd: Users</title> + <tabs> + <tab> + <text>Settings</text> + <url>/pkg_edit.php?xml=siproxd.xml&id=0</url> + </tab> + <tab> + <text>Users</text> + <url>/pkg.php?xml=siproxdusers.xml</url> + <active/> + </tab> + </tabs> + <configpath>installedpackages->package->$packagename->configuration->settings</configpath> + <adddeleteeditpagefields> + <columnitem> + <fielddescr>Username</fielddescr> + <fieldname>username</fieldname> + </columnitem> + <columnitem> + <fielddescr>Description</fielddescr> + <fieldname>description</fieldname> + </columnitem> + </adddeleteeditpagefields> + <fields> + <field> + <fielddescr>Username</fielddescr> + <fieldname>username</fieldname> + <description>Enter the username here</description> + <type>input</type> + </field> + <field> + <fielddescr>Password</fielddescr> + <fieldname>password</fieldname> + <description>Enter the password here</description> + <type>password</type> + </field> + <field> + <fielddescr>Username Description</fielddescr> + <fieldname>description</fieldname> + <description>Enter the description of the user here</description> + <type>input</type> + </field> + </fields> + <custom_add_php_command> + function sync_package() + { + 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(); + </custom_add_php_command> +</packagegui> + |