Project

General

Profile

« Previous | Next » 

Revision 25d3fbd5

Added by Scott Ullrich about 20 years ago

  • Add ascii art from holger
  • Add base services to status -> services menu

View differences:

etc/ascii-art/pfsense-logo-small.txt
1
    __
2
 __/f \
3
/p \__/ Sense
4
\__/  \
5
   \__/
etc/inc/service-utils.inc
157 157
                        }
158 158
                }
159 159
        }
160
	if(is_process_running($service))
161
		return true;
160 162
	return false;
161 163
}
etc/rc
26 26
echo
27 27
echo "Welcome to pfSense ${version} on the '${PLATFORM}' platform..."
28 28
echo
29
cat /etc/ascii-art/pfsense-logo-small.txt
30
echo
29 31

  
30 32
if [ "$PLATFORM" = "cdrom" ]; then
31 33
	echo "Running CDROM routines..."
usr/local/www/services_wol.php
93 93
			  <tr>
94 94
                  <td width="22%" valign="top" class="vncellreq">Interface</td>
95 95
                  <td width="78%" class="vtable">
96
<select name="interface" class="formfld">
96
		     <select name="interface" class="formfld">
97 97
                      <?php $interfaces = array('lan' => 'LAN');
98 98
					  for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
99 99
					    if (isset($config['interfaces']['opt' . $i]['enable']) &&
usr/local/www/status_services.php
86 86
	$ps[] = trim(array_pop(explode(' ', array_pop(explode('/', $line)))));
87 87
}
88 88

  
89
if($config['installedpackages']['service']) {
90
	foreach($config['installedpackages']['service'] as $service) {
89
$services = &$config['installedpackages']['service'];
90

  
91
/*    Add services that are in the base.
92
 *
93
 */
94
if(isset($config['dnsmasq']['enable'])) {
95
	$pconfig['name'] = "dnsmasq";
96
	$pconfig['description'] = "DNS Forwarder";
97
	$services[] = $pconfig;
98
}
99

  
100
if(isset($config['captiveportal']['enable'])) {
101
	$pconfig['name'] = "mini_httpd";
102
	$pconfig['description'] = "Captive Portal";
103
	$services[] = $pconfig;
104
}
105

  
106
if(isset($config['dnsmasq']['enable'])) {
107
	$pconfig['name'] = "dnsmasq";
108
	$pconfig['description'] = "DHCP Relay";
109
	$services[] = $pconfig;
110
}
111

  
112
if(isset($config['dhcpd']['enable'])) {
113
	$pconfig['name'] = "dhcpd";
114
	$pconfig['description'] = "DHCP Server";
115
	$services[] = $pconfig;
116
}
117

  
118
if(isset($config['snmpd']['enable'])) {
119
	$pconfig['name'] = "bsnmpd";
120
	$pconfig['description'] = "SNMP";
121
	$services[] = $pconfig;
122
}
123

  
124
if(isset($config['wol']['wolentry'])) {
125
	$pconfig['name'] = "wol";
126
	$pconfig['description'] = "Wake on lan";
127
	$services[] = $pconfig;
128
}
129

  
130
if(isset($config['proxyarp']['proxyarpnet'])) {
131
	$pconfig['name'] = "proxyarp";
132
	$pconfig['description'] = "Proxy Arp";
133
	$services[] = $pconfig;
134
}
135

  
136
if($services) {
137
	foreach($services as $service) {
91 138
		if(!$service['name']) continue;
92 139
		if(!$service['description']) $service['description'] = "Unknown";
93 140
		echo '<tr><td class="listlr">' . $service['name'] . '</td>';
94 141
		echo '<td class="listlr">' . $service['description'] . '</td>';
95
		if(is_service_running($service['name'], $ps)) {
96
			echo '<td class="listlr">Running</td>';
142
		if(is_service_running($service['name'], $ps) or is_process_running($service['name']) ) {
143
			echo '<td class="listbg"><font color="white">Running</td><td><img src="/themes/{$g["theme"]/images/icons/icon_pass.gif"></td>';
97 144
			$running = true;
98 145
		} else {
99
			echo '<td class="listbg">Stopped</td>';
146
			echo '<td class="listbg"><font color="white">Stopped</td><td><img src="/themes/{$g["theme"]/images/icons/icon_block.gif"></td>';
100 147
			$running = false;
101 148
		}
102 149
		echo '<td valign="middle" class="list" nowrap>';

Also available in: Unified diff