diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-12-26 23:00:52 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-12-26 23:00:52 +0000 |
commit | 422e039b33d37f6cadff5b2370ab4b036bef88f7 (patch) | |
tree | 2ef374095c5e211c918fcadf2978b98e909674ce /usr/local/www/status_services.php | |
parent | 32f5ff5af42027c32deab5336d6e6fc80364e766 (diff) | |
download | pfsense-422e039b33d37f6cadff5b2370ab4b036bef88f7.zip pfsense-422e039b33d37f6cadff5b2370ab4b036bef88f7.tar.gz |
MFC miniupnpd changes from Ryan Wagoner
Diffstat (limited to 'usr/local/www/status_services.php')
-rwxr-xr-x | usr/local/www/status_services.php | 35 |
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> - |