Line 78... |
Line 78... |
78 |
exec("sudo /bin/systemctl enable $service.service");
|
78 |
exec("sudo /bin/systemctl enable $service.service");
|
79 |
file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
|
79 |
file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
|
80 |
exec ("sudo /usr/local/bin/alcasar-iptables.sh");
|
80 |
exec ("sudo /usr/local/bin/alcasar-iptables.sh");
|
81 |
}
|
81 |
}
|
82 |
if ($action == "stop"){
|
82 |
if ($action == "stop"){
|
83 |
exec("sudo /bin/systemctl disable $service.service");
|
83 |
exec("sudo /sbin/systemctl disable $service.service");
|
84 |
file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
|
84 |
file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
|
85 |
exec ("sudo /usr/local/bin/alcasar-iptables.sh");
|
85 |
exec ("sudo /usr/local/bin/alcasar-iptables.sh");
|
86 |
}
|
86 |
}
|
87 |
}
|
87 |
}
|
88 |
return $retstatus;
|
88 |
return $retstatus;
|
Line 158... |
Line 158... |
158 |
<tr>
|
158 |
<tr>
|
159 |
<?php if ($statusOK) { ?>
|
159 |
<?php if ($statusOK) { ?>
|
160 |
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
|
160 |
<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
|
161 |
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
|
161 |
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
|
162 |
<td width="80" align="center">---</td>
|
162 |
<td width="80" align="center">---</td>
|
163 |
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
|
163 |
<td width="80" align="center"><?php if ($serviceName != "chilli") { echo "<a href=".$_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop</a>"; } else echo "---";?></td>
|
164 |
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
|
164 |
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
|
165 |
<?php } else { ?>
|
165 |
<?php } else { ?>
|
166 |
<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
|
166 |
<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
|
167 |
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
|
167 |
<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
|
168 |
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
|
168 |
<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
|