aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/miniupnpd/miniupnpd.inc12
-rw-r--r--packages/miniupnpd/miniupnpd.xml17
-rw-r--r--packages/miniupnpd/status_upnp.php7
3 files changed, 23 insertions, 13 deletions
diff --git a/packages/miniupnpd/miniupnpd.inc b/packages/miniupnpd/miniupnpd.inc
index a8721c8b..fdee5a9e 100644
--- a/packages/miniupnpd/miniupnpd.inc
+++ b/packages/miniupnpd/miniupnpd.inc
@@ -2,7 +2,7 @@
require_once("config.inc");
require_once("functions.inc");
- /* Miniupnpd */
+ /* MiniUPnP */
function upnp_notice ($msg) { syslog(LOG_NOTICE, "miniupnpd: $msg"); return; }
function upnp_warn ($msg) { syslog(LOG_WARNING, "miniupnpd: $msg"); return; }
@@ -65,8 +65,8 @@
config_lock();
- /* since config is written before this file invoked we don't need to read post data */
- if(upnp_config("iface_array"))
+ /* since config is written before this file invoked we don't need to read post data */
+ if(upnp_config("enable") && upnp_config("iface_array"))
$iface_array = explode(",",upnp_config("iface_array"));
if($iface_array) {
@@ -170,7 +170,11 @@ EOD;
/* lets stop the service and remove the rc file */
if(file_exists("/usr/local/etc/rc.d/miniupnpd.sh")) {
- upnp_notice("Stopping service, no interfaces selected");
+ if(!upnp_config("enable"))
+ upnp_notice("Stopping service, miniupnpd disabled");
+ else
+ upnp_notice("Stopping service, no interfaces selected");
+
stop_service("miniupnpd");
conf_mount_rw();
diff --git a/packages/miniupnpd/miniupnpd.xml b/packages/miniupnpd/miniupnpd.xml
index 058e472d..6a579348 100644
--- a/packages/miniupnpd/miniupnpd.xml
+++ b/packages/miniupnpd/miniupnpd.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<packagegui>
- <title>Services: Miniupnpd</title>
+ <title>Services: MiniUPnP</title>
<name>miniupnpd</name>
<version>20061214</version>
<savetext>Change</savetext>
<include_file>/usr/local/pkg/miniupnpd.inc</include_file>
<aftersaveredirect>status_upnp.php</aftersaveredirect>
<menu>
- <name>Miniupnpd</name>
+ <name>MiniUPnP</name>
<tooltiptext>Set miniupnpd settings such as interfaces to listen on.</tooltiptext>
<section>Services</section>
<url>/status_upnp.php</url>
@@ -34,24 +34,29 @@
</service>
<tabs>
<tab>
- <text>UPNP Status</text>
+ <text>UPnP Status</text>
<url>status_upnp.php</url>
</tab>
<tab>
- <text>miniupnpd Settings</text>
+ <text>MiniUPnP Settings</text>
<url>/pkg_edit.php?xml=miniupnpd.xml&amp;id=0</url>
<active/>
</tab>
</tabs>
<fields>
<field>
- <fielddescr>Interface (generally LAN)&lt;br&gt;
- NOTE: If no interfaces are selected miniupnpd is disabled</fielddescr>
+ <fielddescr>Enable MiniUPnP</fielddescr>
+ <fieldname>enable</fieldname>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Interfaces (generally LAN)</fielddescr>
<fieldname>iface_array</fieldname>
<value>lan</value>
<multiple>true</multiple>
<size>3</size>
<type>interfaces_selection</type>
+ <description>You can use the CTRL or COMMAND key to select multiple interfaces.</description>
</field>
<field>
<fielddescr>Maximum Download Speed (Kbits/second)</fielddescr>
diff --git a/packages/miniupnpd/status_upnp.php b/packages/miniupnpd/status_upnp.php
index 35aae38f..1e1a961b 100644
--- a/packages/miniupnpd/status_upnp.php
+++ b/packages/miniupnpd/status_upnp.php
@@ -32,7 +32,8 @@
require("guiconfig.inc");
/* Defaults to this page but if no settings are present, redirect to setup page */
-if(!$config['installedpackages']['miniupnpd']['config'][0]['iface_array'])
+if(!$config['installedpackages']['miniupnpd']['config'][0]['iface_array'] ||
+ !$config['installedpackages']['miniupnpd']['config'][0]['enable'])
Header("Location: /pkg_edit.php?xml=miniupnpd.xml&id=0");
if ($_POST) {
@@ -65,8 +66,8 @@ include("head.inc");
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php
$tab_array = array();
- $tab_array[] = array(gettext("UPNP Status "), true, "/status_upnp.php");
- $tab_array[] = array(gettext("miniupnpd Settings "), false, "/pkg_edit.php?xml=miniupnpd.xml&id=0");
+ $tab_array[] = array(gettext("UPnP Status "), true, "/status_upnp.php");
+ $tab_array[] = array(gettext("MiniUPnP Settings "), false, "/pkg_edit.php?xml=miniupnpd.xml&id=0");
display_top_tabs($tab_array);
?>
</table>