saving changes
This commit is contained in:
@@ -26,25 +26,11 @@ $fh = fopen("/home/pi/BirdNET-Pi/birdnet.conf", "w");
|
||||
$fh2 = fopen("/home/pi/BirdNET-Pi/thisrun.txt", "w");
|
||||
fwrite($fh, $contents);
|
||||
fwrite($fh2, $contents2);
|
||||
session_start();
|
||||
$_SESSION['success'] = 1;
|
||||
if(isset($_POST["normal"])){
|
||||
header('Location:config.php');
|
||||
}else{
|
||||
header('Location:../../');
|
||||
}
|
||||
|
||||
$language = $_POST["language"];
|
||||
if ($language != "none"){
|
||||
$command = "sudo -upi mv /home/pi/BirdNET-Pi/model/labels.txt /home/pi/BirdNET-Pi/model/labels.txt.old && sudo -upi unzip /home/pi/BirdNET-Pi/model/labels_l18n.zip $language -d /home/pi/BirdNET-Pi/model && sudo -upi mv /home/pi/BirdNET-Pi/model/$language /home/pi/BirdNET-Pi/model/labels.txt";
|
||||
$command_output = `$command`;
|
||||
session_start();
|
||||
$_SESSION['success'] = 1;
|
||||
if(isset($_POST["normal"])){
|
||||
header('Location:config.php');
|
||||
}else{
|
||||
header('Location:../../');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user