summaryrefslogtreecommitdiffstats
path: root/usr/local/pkg
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-06-30 21:54:20 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-06-30 21:54:20 +0000
commitdaf52412e8bf520a13c3ccbc90ffb6c7cde0d9c9 (patch)
tree78f91d8894071ec31e844d528f778cf8eaf10e76 /usr/local/pkg
parent6f20377b6fdf63cccc433ed684fbf91430c57a40 (diff)
downloadpfsense-daf52412e8bf520a13c3ccbc90ffb6c7cde0d9c9.zip
pfsense-daf52412e8bf520a13c3ccbc90ffb6c7cde0d9c9.tar.gz
Correctly move upnp to base since LiveCD cannot write files to /usr/local/etc or /usr/local/etc/rc.d/ Ticket #1342
Diffstat (limited to 'usr/local/pkg')
-rw-r--r--usr/local/pkg/miniupnpd.inc15
1 files changed, 13 insertions, 2 deletions
diff --git a/usr/local/pkg/miniupnpd.inc b/usr/local/pkg/miniupnpd.inc
index 5a2c543..c13cc30 100644
--- a/usr/local/pkg/miniupnpd.inc
+++ b/usr/local/pkg/miniupnpd.inc
@@ -11,8 +11,19 @@
function upnp_warn ($msg) { syslog(LOG_WARNING, "miniupnpd: {$msg}"); return; }
function upnp_action ($action) {
- if (file_exists(UPNP_RCFILE))
- mwexec(UPNP_RCFILE.' '.$action);
+ switch($action) {
+ case "start":
+ mwexec("killall miniupnpd 2>/dev/null");
+ upnp_start();
+ break;
+ case "stop":
+ mwexec("killall miniupnpd");
+ break;
+ case "restart":
+ mwexec("killall miniupnpd");
+ upnp_start();
+ break;
+ }
}
function upnp_running () {
OpenPOWER on IntegriCloud