summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_services.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-05-15 11:40:50 +0545
committerPhil Davis <phil.davis@inf.org>2015-05-15 11:40:50 +0545
commit42b0c92129b93ca6d182f4904ec92708c9a8c750 (patch)
tree7d396b83ba7920878bb6e8f42ae5907e9518c003 /usr/local/www/status_services.php
parentc8f1c7bd70cd156f23a59400e5c738ef8bf5281b (diff)
downloadpfsense-42b0c92129b93ca6d182f4904ec92708c9a8c750.zip
pfsense-42b0c92129b93ca6d182f4904ec92708c9a8c750.tar.gz
Code style WWW Status
Diffstat (limited to 'usr/local/www/status_services.php')
-rwxr-xr-xusr/local/www/status_services.php23
1 files changed, 14 insertions, 9 deletions
diff --git a/usr/local/www/status_services.php b/usr/local/www/status_services.php
index d78f8bb..e4402da 100755
--- a/usr/local/www/status_services.php
+++ b/usr/local/www/status_services.php
@@ -26,7 +26,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
+/*
pfSense_BUILDER_BINARIES: /usr/local/sbin/openvpn /usr/bin/killall /bin/ps
pfSense_MODULE: services
*/
@@ -43,8 +43,9 @@ require_once("service-utils.inc");
require_once("shortcuts.inc");
$service_name = '';
-if (isset($_GET['service']))
+if (isset($_GET['service'])) {
$service_name = htmlspecialchars($_GET['service']);
+}
if (!empty($service_name)) {
switch ($_GET['mode']) {
@@ -62,8 +63,9 @@ if (!empty($service_name)) {
}
/* batch mode, allow other scripts to call this script */
-if($_GET['batch'])
+if ($_GET['batch']) {
exit;
+}
$pgtitle = array(gettext("Status"),gettext("Services"));
include("head.inc");
@@ -93,19 +95,22 @@ $services = get_services();
if (count($services) > 0) {
uasort($services, "service_name_compare");
- foreach($services as $service) {
- if (empty($service['name']))
+ foreach ($services as $service) {
+ if (empty($service['name'])) {
continue;
- if (empty($service['description']))
+ }
+ if (empty($service['description'])) {
$service['description'] = get_pkg_descr($service['name']);
+ }
echo "<tr><td class=\"listlr\" width=\"20%\">" . $service['name'] . "</td>\n";
echo "<td class=\"listr\" width=\"55%\">" . $service['description'] . "</td>\n";
// if service is running then listr else listbg
$bgclass = null;
- if (get_service_status($service))
+ if (get_service_status($service)) {
$bgclass = "listr";
- else
+ } else {
$bgclass = "listbg";
+ }
echo "<td class=\"" . $bgclass . "\" align=\"center\">" . get_service_status_icon($service, true, true) . "</td>\n";
echo "<td valign=\"middle\" class=\"list nowrap\">" . get_service_control_links($service);
$scut = get_shortcut_by_service_name($service['name']);
@@ -121,7 +126,7 @@ if (count($services) > 0) {
}
?>
-</tbody>
+ </tbody>
</table>
</div>
</form>
OpenPOWER on IntegriCloud