Subversion Repositories ALCASAR

Rev

Rev 3170 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3170 Rev 3173
Line 156... Line 156...
156
 
156
 
157
// Testing if a service is active
157
// Testing if a service is active
158
function checkServiceStatus($service){
158
function checkServiceStatus($service){
159
	$response = false;
159
	$response = false;
160
	exec("sudo /usr/bin/systemctl is-active ".escapeshellarg("$service.service"), $retval);
160
	exec("sudo /usr/bin/systemctl is-active ".escapeshellarg("$service.service"), $retval);
161
	foreach( $retval as $val ) {
161
	foreach ( $retval as $val ) {
162
		if ($val == "active"){
162
		if ($val == "active"){
163
			$response = true;
163
			$response = true;
164
			break;
164
			break;
165
		}
165
		}
166
	}
166
	}
Line 260... Line 260...
260
<div class="panel">
260
<div class="panel">
261
	<div class="panel-header"><?= $l_main_services ?></div>
261
	<div class="panel-header"><?= $l_main_services ?></div>
262
	<div class="panel-row">
262
	<div class="panel-row">
263
	<table width="100%" border=0 cellspacing=0 cellpadding=0>
263
	<table width="100%" border=0 cellspacing=0 cellpadding=0>
264
		<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
264
		<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
265
		<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
265
		<?php foreach ( $MainServiceStatus as $serviceName => $statusOK ) { ?>
266
		<tr>
266
		<tr>
267
		<?php if ($statusOK) { ?>
267
		<?php if ($statusOK) { ?>
268
			<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
268
			<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
269
			<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
269
			<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
270
			<td width="80" align="center">---</td>
270
			<td width="80" align="center">---</td>
Line 286... Line 286...
286
	<div class="panel-header"><?= $l_filter_services ?></div>
286
	<div class="panel-header"><?= $l_filter_services ?></div>
287
	<div class="panel-row">
287
	<div class="panel-row">
288
	<table width="100%" border=0 cellspacing=0 cellpadding=0>
288
	<table width="100%" border=0 cellspacing=0 cellpadding=0>
289
		<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
289
		<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
290
		<!--	<TR align="center"> -->
290
		<!--	<TR align="center"> -->
291
		<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
291
		<?php foreach ( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
292
		<tr>
292
		<tr>
293
		<?php if ($statusOK) { ?>
293
		<?php if ($statusOK) { ?>
294
			<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
294
			<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
295
			<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
295
			<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
296
			<td width="80" align="center">---</td>
296
			<td width="80" align="center">---</td>