summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_services.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-12-26 23:00:52 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-12-26 23:00:52 +0000
commit422e039b33d37f6cadff5b2370ab4b036bef88f7 (patch)
tree2ef374095c5e211c918fcadf2978b98e909674ce /usr/local/www/status_services.php
parent32f5ff5af42027c32deab5336d6e6fc80364e766 (diff)
downloadpfsense-422e039b33d37f6cadff5b2370ab4b036bef88f7.zip
pfsense-422e039b33d37f6cadff5b2370ab4b036bef88f7.tar.gz
MFC miniupnpd changes from Ryan Wagoner
Diffstat (limited to 'usr/local/www/status_services.php')
-rwxr-xr-xusr/local/www/status_services.php35
1 files changed, 26 insertions, 9 deletions
diff --git a/usr/local/www/status_services.php b/usr/local/www/status_services.php
index 4001d5a..26c38eb 100755
--- a/usr/local/www/status_services.php
+++ b/usr/local/www/status_services.php
@@ -46,48 +46,59 @@ if($_GET['mode'] == "restartservice" and $_GET['service']) {
switch($_GET['service']) {
case 'bsnmpd':
services_snmpd_configure();
- sleep(5);
break;
case 'dnsmasq':
services_dnsmasq_configure();
- sleep(5);
break;
case 'dhcpd':
services_dhcpd_configure();
- sleep(5);
+ break;
+ case 'miniupnpd':
+ if(file_exists('/usr/local/etc/rc.d/miniupnpd.sh'))
+ mwexec('/usr/local/etc/rc.d/miniupnpd.sh restart');
break;
default:
restart_service($_GET['service']);
- sleep(5);
break;
}
$savemsg = "{$_GET['service']} has been restarted.";
+ sleep(5);
}
if($_GET['mode'] == "startservice" and $_GET['service']) {
switch($_GET['service']) {
case 'bsnmpd':
services_snmpd_configure();
- sleep(5);
break;
case 'dnsmasq':
services_dnsmasq_configure();
- sleep(5);
break;
case 'dhcpd':
services_dhcpd_configure();
- sleep(5);
+ break;
+ case 'miniupnpd':
+ if(file_exists('/usr/local/etc/rc.d/miniupnpd.sh'))
+ mwexec('/usr/local/etc/rc.d/miniupnpd.sh start');
break;
default:
start_service($_GET['service']);
- sleep(5);
break;
}
$savemsg = "{$_GET['service']} has been started.";
+ sleep(5);
}
if($_GET['mode'] == "stopservice" and $_GET['service']) {
+ switch($_GET['service']) {
+ case 'miniupnpd':
+ /* can't just killbyname since we need to clear pf rules */
+ if(file_exists('/usr/local/etc/rc.d/miniupnpd.sh'))
+ mwexec('/usr/local/etc/rc.d/miniupnpd.sh stop');
+ break;
+ default:
stop_service($_GET['service']);
+ break;
+ }
$savemsg = "{$_GET['service']} has been stopped.";
sleep(5);
}
@@ -189,6 +200,13 @@ if(isset($config['proxyarp']['proxyarpnet'])) {
unset($pconfig);
}
+if($config['installedpackages']['miniupnpd']['config'][0]['enable']) {
+ $pconfig['name'] = "miniupnpd";
+ $pconfig['description'] = gettext("MiniUPnPd Service");
+ $services[] = $pconfig;
+ unset($pconfig);
+}
+
if($services) {
foreach($services as $service) {
if(!$service['name']) continue;
@@ -233,4 +251,3 @@ if($services) {
<?php include("fend.inc"); ?>
</body>
</html>
-
OpenPOWER on IntegriCloud