adding stop core services button
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
<input type="submit" value="Edit the birdnet.conf file">
|
||||
</form>
|
||||
|
||||
<form action="/scripts/stop_core_services.php" onclick="return confirm('Stop core services?')">
|
||||
<input type="submit" value="Stop Core BirdNET-Pi Services">
|
||||
</form>
|
||||
|
||||
<form action="/scripts/restart_services.php" onclick="return confirm('Restart ALL services?')">
|
||||
<input type="submit" value="Restart ALL BirdNET-Pi Services">
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
shell_exec("/home/pi/BirdNET-Pi/scripts/stop_core_services.sh");
|
||||
header('Location: http://birdnetpi.local/scripts/index.html?success=true');
|
||||
?>
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Restarts ALL services and removes ALL unprocessed audio
|
||||
|
||||
|
||||
services=(birdnet_recording.service
|
||||
birdnet_analysis.service
|
||||
extraction.timer)
|
||||
|
||||
for i in "${services[@]}";do
|
||||
sudo systemctl stop ${i}
|
||||
done
|
||||
sudo rm -rf ${RECS_DIR}/$(date +%B-%Y/%d-%A)/*
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
shell_exec("sudo -u pi /home/pi/BirdNET-Pi/scripts/update_birdnet.sh > /tmp/phpupdate.log 2&>1");
|
||||
header('Location: http://birdnetpi.local/index.html?success=true');
|
||||
?>
|
||||
Reference in New Issue
Block a user