diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/arpwatch.xml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/packages/arpwatch.xml b/packages/arpwatch.xml new file mode 100644 index 00000000..97f907c2 --- /dev/null +++ b/packages/arpwatch.xml @@ -0,0 +1,46 @@ +<packagegui> + <name>arpwatch</name> + <title>arpwatch: Settings</title> + <version>2.1.a13</version> + <configpath>installedpackages->package->$packagename->configuration->settings</configpath> + <aftersaveredirect>pkg_edit.php?xml=arpwatch.xml&id=0</aftersaveredirect> + <menu> + <name>arpwatch</name> + <tooltiptext>Modify arpwatch settings.</tooltiptext> + <section>Services</section> + <configfile>arpwatch.xml</configfile> + <url>/pkg_edit.php?xml=arpwatch.xml&id=0</url> + </menu> + <fields> + <field> + <fielddescr>Listening Interface</fielddescr> + <fieldname>interface</fieldname> + <description>Enter the desired listening interface here.</description> + <type>interfaces_selection</type> + </field> + </fields> + <custom_php_install_command> + unlink_if_exists("/usr/local/etc/rc.d/arpwatch.sh"); + </custom_php_install_command> + <custom_php_global_functions> + function sync_package_arpwatch() { + conf_mount_rw(); + config_lock(); + global $config; + $fout = fopen("/usr/local/etc/rc.d/arpwatch.sh","w"); + fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n"); + if(isset($config['installedpackages']['arpwatch']['config']['0']['interface'])) { + $int = convert_friendly_interface_to_real_interface_name($config['installedpackages']['arpwatch']['config']['0']['interface']); + fwrite($fout, "/usr/local/sbin/arpwatch -i " . $int . "\n\n"); + } + fclose($fout); + conf_mount_ro(); + config_unlock(); + } + </custom_php_global_functions> + <custom_add_php_command> + sync_package_arpwatch(); + mwexec("/usr/bin/killall -HUP arpwatch"); + </custom_add_php_command> +</packagegui> + |