diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-07-30 23:01:45 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-07-30 23:01:45 +0000 |
commit | 25d3fbd548e93a12ac017cb767ed76f945fa2543 (patch) | |
tree | ed8420fb01d7f4c0d4c5ea5b2b43debd6578a965 /usr | |
parent | bb75cfdf8f3d5c3fc1d4683ab7577d98ef59b423 (diff) | |
download | pfsense-25d3fbd548e93a12ac017cb767ed76f945fa2543.zip pfsense-25d3fbd548e93a12ac017cb767ed76f945fa2543.tar.gz |
* Add ascii art from holger
* Add base services to status -> services menu
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/services_wol.php | 2 | ||||
-rwxr-xr-x | usr/local/www/status_services.php | 57 |
2 files changed, 53 insertions, 6 deletions
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php index 942388e..245e4cb 100755 --- a/usr/local/www/services_wol.php +++ b/usr/local/www/services_wol.php @@ -93,7 +93,7 @@ include("head.inc"); <tr> <td width="22%" valign="top" class="vncellreq">Interface</td> <td width="78%" class="vtable"> -<select name="interface" class="formfld"> + <select name="interface" class="formfld"> <?php $interfaces = array('lan' => 'LAN'); for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) { if (isset($config['interfaces']['opt' . $i]['enable']) && diff --git a/usr/local/www/status_services.php b/usr/local/www/status_services.php index 4737238..a9b4829 100755 --- a/usr/local/www/status_services.php +++ b/usr/local/www/status_services.php @@ -86,17 +86,64 @@ foreach($psout as $line) { $ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line))))); } -if($config['installedpackages']['service']) { - foreach($config['installedpackages']['service'] as $service) { +$services = &$config['installedpackages']['service']; + +/* Add services that are in the base. + * + */ +if(isset($config['dnsmasq']['enable'])) { + $pconfig['name'] = "dnsmasq"; + $pconfig['description'] = "DNS Forwarder"; + $services[] = $pconfig; +} + +if(isset($config['captiveportal']['enable'])) { + $pconfig['name'] = "mini_httpd"; + $pconfig['description'] = "Captive Portal"; + $services[] = $pconfig; +} + +if(isset($config['dnsmasq']['enable'])) { + $pconfig['name'] = "dnsmasq"; + $pconfig['description'] = "DHCP Relay"; + $services[] = $pconfig; +} + +if(isset($config['dhcpd']['enable'])) { + $pconfig['name'] = "dhcpd"; + $pconfig['description'] = "DHCP Server"; + $services[] = $pconfig; +} + +if(isset($config['snmpd']['enable'])) { + $pconfig['name'] = "bsnmpd"; + $pconfig['description'] = "SNMP"; + $services[] = $pconfig; +} + +if(isset($config['wol']['wolentry'])) { + $pconfig['name'] = "wol"; + $pconfig['description'] = "Wake on lan"; + $services[] = $pconfig; +} + +if(isset($config['proxyarp']['proxyarpnet'])) { + $pconfig['name'] = "proxyarp"; + $pconfig['description'] = "Proxy Arp"; + $services[] = $pconfig; +} + +if($services) { + foreach($services as $service) { if(!$service['name']) continue; if(!$service['description']) $service['description'] = "Unknown"; echo '<tr><td class="listlr">' . $service['name'] . '</td>'; echo '<td class="listlr">' . $service['description'] . '</td>'; - if(is_service_running($service['name'], $ps)) { - echo '<td class="listlr">Running</td>'; + if(is_service_running($service['name'], $ps) or is_process_running($service['name']) ) { + echo '<td class="listbg"><font color="white">Running</td><td><img src="/themes/{$g["theme"]/images/icons/icon_pass.gif"></td>'; $running = true; } else { - echo '<td class="listbg">Stopped</td>'; + echo '<td class="listbg"><font color="white">Stopped</td><td><img src="/themes/{$g["theme"]/images/icons/icon_block.gif"></td>'; $running = false; } echo '<td valign="middle" class="list" nowrap>'; |