testing updater

This commit is contained in:
mcguirepr89
2022-02-16 09:41:27 -05:00
parent a02680a46d
commit 6fada3f135
+17 -2
View File
@@ -78,11 +78,26 @@ a {
</div> </div>
<div class="column second"> <div class="column second">
<?php <?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
if(isset($_POST['submit'])){ if(isset($_POST['submit'])){
$command = $_POST['submit']; $command = $_POST['submit'];
echo "<h3>Executing $command</h3>"; if($command == 'update_birdnet.sh'){
shell_exec("$command"); $str= "<h3>Updating . . . </h3>
<p>Please wait 60 seconds</p>";
echo str_pad($str, 4096);
ob_flush();
flush();
} }
if(isset($command)){
$results = shell_exec("$command 2>&1");
echo "<pre>$results</pre>";
}
}
ob_end_flush();
?> ?>
</div> </div>
</div>
</body> </body>