petar.company/mail-restart.php

53 lines
1.6 KiB
PHP
Raw Permalink Normal View History

2025-03-01 00:58:18 +01:00
<?php
include_once("./include/cfg-petar.php");
include_once("./include/cfg-mail.php");
include_once("./include/layout.php");
include_once("./include/users.php");
include_once("./include/db.php");
?>
<!-- ------------------------------------------------------------------------ -->
<?php require 'include/inc-header.php';?>
<!-- ------------------------------------------------------------------------ -->
<?php require 'include/inc-top.php';?>
<!-- ------------------------------------------------------------------------ -->
<tr bgcolor=navy align=center>
<td colspan=2><font color=yellow><b>Sendmail Restart</b></font></td>
<?php
if ($mail_mode == "full") { $PARAM="MAL"; } else { $PARAM="FWD"; }
if ($PARAM=="MAL") { $TABLE="MAILUSER"; } else { $TABLE="FWDUSER";}
echo "<tr>".
2025-03-08 11:46:44 +01:00
"<td colspan=2>";
2025-03-01 00:58:18 +01:00
2025-03-08 11:46:44 +01:00
if ($restricted_petar == false) {
echo "<p>+ [ <strong>DB rebuild TABLE: $TABLE</strong> ]<br>";
$output = shell_exec("/usr/local/bin/sudo ".$mng_user." ".$PARAM);
echo "<p>".
"<pre>$output</pre>";
}
2025-03-01 00:58:18 +01:00
echo "<p>+ [ <strong>SRV restart</strong> ]<br>";
2025-03-08 11:46:44 +01:00
$output = shell_exec("/usr/local/bin/sudo ".$mng_user." SRV ");
echo "<p>".
2025-03-01 00:58:18 +01:00
"<pre>$output</pre>";
echo "</td></tr>";
?>
<!-- ------------------------------------------------------------------------ -->
<?php require 'include/inc-footer.php';?>
<!-- ------------------------------------------------------------------------ -->