diff options
author | Danilo G. Baio (dbaio) <dbaio@bsd.com.br> | 2015-03-25 00:20:50 -0300 |
---|---|---|
committer | Danilo G. Baio (dbaio) <dbaio@bsd.com.br> | 2015-03-25 00:20:50 -0300 |
commit | 2211b045710c9d0648b3de07f750ccbe5b3f76d4 (patch) | |
tree | 5e041d60d0b26d31d1691a68b0b58a57bd4d3b5c /config/apcupsd | |
parent | 0677ffb88181f442ad9c28be3e776d82eeb1594d (diff) | |
download | pfsense-packages-2211b045710c9d0648b3de07f750ccbe5b3f76d4.tar.gz pfsense-packages-2211b045710c9d0648b3de07f750ccbe5b3f76d4.tar.bz2 pfsense-packages-2211b045710c9d0648b3de07f750ccbe5b3f76d4.zip |
apcupsd - fix tabs
Diffstat (limited to 'config/apcupsd')
-rwxr-xr-x | config/apcupsd/apcupsd_status.php | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/config/apcupsd/apcupsd_status.php b/config/apcupsd/apcupsd_status.php index 68c0b5aa..dd6a980c 100755 --- a/config/apcupsd/apcupsd_status.php +++ b/config/apcupsd/apcupsd_status.php @@ -107,7 +107,7 @@ pre { <td width="14%" valign="top" class="vncellreq">Host:</td> <td width="86%" class="vtable"> <input name="strapcaccess" type="text" class="formfld unknown" id="strapcaccess" size="22" value="<? echo "{$strapcaccess}"; ?>"> - <br/> + <br/> <span class="vexpl"> Default: <b>localhost</b><br/> apcaccess uses apcupsd's inbuilt Network Information Server (NIS) to obtain the current status information <br/> @@ -120,46 +120,46 @@ pre { <?php else: ?> <input type="Submit" value="Execute" class="formbtn"/> <?php endif; ?> - </span> - </td> + </span> + </td> </tr> </form> <tr><td colspan="2"> <?php - $nis_server = check_nis_running_apcupsd(); + $nis_server = check_nis_running_apcupsd(); - if ($pf_version >= 2.2){ - if($strapcaccess) { + if ($pf_version >= 2.2){ + if($strapcaccess) { echo "Running: apcaccess -h {$strapcaccess} <br/>"; puts("<pre>"); putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"); - $ph = popen("apcaccess -h {$strapcaccess} 2>&1", "r" ); - while ($line = fgets($ph)) echo htmlspecialchars($line); - pclose($ph); - puts("</pre>"); + $ph = popen("apcaccess -h {$strapcaccess} 2>&1", "r" ); + while ($line = fgets($ph)) echo htmlspecialchars($line); + pclose($ph); + puts("</pre>"); }elseif($nis_server){ - $nisip=(check_nis_ip_apcupsd() != ''? check_nis_ip_apcupsd() : "0.0.0.0"); - $nisport=(check_nis_port_apcupsd() != ''? check_nis_port_apcupsd() : "3551"); + $nisip=(check_nis_ip_apcupsd() != ''? check_nis_ip_apcupsd() : "0.0.0.0"); + $nisport=(check_nis_port_apcupsd() != ''? check_nis_port_apcupsd() : "3551"); echo "Running: apcaccess -h {$nisip}:{$nisport} <br/>"; puts("<pre>"); putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"); - $ph = popen("apcaccess -h localhost 2>&1", "r" ); + $ph = popen("apcaccess -h localhost 2>&1", "r" ); while ($line = fgets($ph)) echo htmlspecialchars($line); - pclose($ph); - puts("</pre>"); + pclose($ph); + puts("</pre>"); }else - echo "Not running Network Information Server (NIS). In order to run apcaccess on localhost, you need to enable it on APCupsd General settings. <br/>"; + echo "Not running Network Information Server (NIS). In order to run apcaccess on localhost, you need to enable it on APCupsd General settings. <br/>"; }else{ - echo "pfSense version prior to 2.2 runs APCupsd 3.14.10 and apcaccess doesn't accept host parameter. <br/>"; - if ($nis_server){ - puts("<pre>"); - putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"); - $ph = popen("apcaccess 2>&1", "r" ); - while ($line = fgets($ph)) echo htmlspecialchars($line); - pclose($ph); - puts("</pre>"); - }else - echo "Not Network Information Server (NIS). In order to run apcaccess on localhost, you need to enable it on APCupsd General settings. <br/>"; + echo "pfSense version prior to 2.2 runs APCupsd 3.14.10 and apcaccess doesn't accept host parameter. <br/>"; + if ($nis_server){ + puts("<pre>"); + putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"); + $ph = popen("apcaccess 2>&1", "r" ); + while ($line = fgets($ph)) echo htmlspecialchars($line); + pclose($ph); + puts("</pre>"); + }else + echo "Not Network Information Server (NIS). In order to run apcaccess on localhost, you need to enable it on APCupsd General settings. <br/>"; } ?> |