mirror of
https://github.com/pkali/piradio-mini.git
synced 2026-05-20 22:34:22 +02:00
First maintenance button in web-interface.
This commit is contained in:
@@ -33,6 +33,16 @@ if (isset($msg)) {
|
||||
echo " window.location.href = 'index.html';\r\n";
|
||||
echo "}, 30000);\r\n";
|
||||
echo "</script>\r\n";
|
||||
} elseif ($msg == "clear_caches") {
|
||||
$end = shell_exec('sudo ./scripts/clear_caches.sh');
|
||||
echo "Clear logs and caches.<br>\r\n";
|
||||
echo "Wait!<br>\r\n";
|
||||
echo "<script>\r\n";
|
||||
echo "// redirect to main after 5 seconds\r\n";
|
||||
echo "window.setTimeout(function() {\r\n";
|
||||
echo " window.location.href = 'index.html';\r\n";
|
||||
echo "}, 5000);\r\n";
|
||||
echo "</script>\r\n";
|
||||
} elseif ($msg == "audio") {
|
||||
$selected = $_POST['output'];
|
||||
$hda = $_POST['hda'];
|
||||
|
||||
@@ -91,6 +91,9 @@ for ($i = 0; $i < count($remoteconfigs); $i++) {
|
||||
Update to last build from github
|
||||
<a href="update.php"><button>PiRadio update</button></a>
|
||||
<hr>
|
||||
Maintenance<br>
|
||||
<a href="changeconf.php?file=clear_caches"><button>Clear logs and caches</button></a>
|
||||
<hr>
|
||||
<a href="changeconf.php?file=restart"><button>PiRadio restart</button></a>
|
||||
<a href="changeconf.php?file=reboot"><button>System reboot</button></a>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user