aboutsummaryrefslogtreecommitdiffstats
path: root/packages/miniupnpd/miniupnpd.inc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/miniupnpd/miniupnpd.inc')
-rw-r--r--packages/miniupnpd/miniupnpd.inc12
1 files changed, 8 insertions, 4 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();