aboutsummaryrefslogtreecommitdiffstats
path: root/config/imspector
diff options
context:
space:
mode:
Diffstat (limited to 'config/imspector')
-rw-r--r--config/imspector/imspector.inc17
-rw-r--r--config/imspector/imspector.xml1
2 files changed, 18 insertions, 0 deletions
diff --git a/config/imspector/imspector.inc b/config/imspector/imspector.inc
index 09974363..ea4458ce 100644
--- a/config/imspector/imspector.inc
+++ b/config/imspector/imspector.inc
@@ -104,6 +104,23 @@
//exec('pkg_delete imspector-0.4');
}
+ function imspector_generate_rules($type) {
+
+ $rules = "";
+ switch ($type) {
+ case 'rdr':
+ $rules = "# IMSpector rdr anchor\n";
+ $rules .= "rdr-anchor \"imspector\"\n";
+ break;
+ case 'rule':
+ $rules = "# IMSpector \n";
+ $rules .= "anchor \"miniupnpd\"\n";
+ break;
+ }
+
+ return $rules;
+ }
+
function sync_package_imspector() {
global $config;
global $input_errors;
diff --git a/config/imspector/imspector.xml b/config/imspector/imspector.xml
index afdcdcf0..c7595b9a 100644
--- a/config/imspector/imspector.xml
+++ b/config/imspector/imspector.xml
@@ -218,4 +218,5 @@
<custom_php_deinstall_command>
deinstall_package_imspector();
</custom_php_deinstall_command>
+ <filter_rules_needed>imspector_generate_rules</filter_rules_needed>
</packagegui>