Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Commit

Permalink
Pi herunterfahren hinzugefügt
Browse files Browse the repository at this point in the history
  • Loading branch information
jannis6023 authored Jan 27, 2020
1 parent 63b7579 commit a494ea3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions PiControl/command.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@
shell_exec('sudo shutdown -r 10');
echo "<div class=\"alert alert-success\">Der Pi wird in 10 Sekunden neu gestartet! Bitte Ton-Anlage wegen lautem Geräusch stumm schalten / leise drehen!</div>";
}

if(isset($_POST['pi-stop'])){

echo "<div class=\"alert alert-danger\">Sicher herunterfahren?";
?>

<form action="command.php" method="post">
<input type="submit" class="btn btn-danger" name="pi-stop-yes" value="Ja, sicher!"></input>
</form>
</div>
<?php
}

if(isset($_POST['pi-stop-yes'])){
shell_exec('sudo shutdown -P 10');
echo "<div class=\"alert alert-success\">Der Pi wird in 10 Sekunden ausgeschaltet! Bitte Ton-Anlage wegen lautem Geräusch stumm schalten / leise drehen!</div>";
}

if(isset($_POST['default'])){
$output = shell_exec('sudo amixer sset PCM 0');
Expand Down

0 comments on commit a494ea3

Please sign in to comment.