adding new php scripts
This commit is contained in:
@@ -128,16 +128,14 @@ for h in "${SCAN_DIRS[@]}";do
|
|||||||
# directory.
|
# directory.
|
||||||
|
|
||||||
### TESTING longer extraction context
|
### TESTING longer extraction context
|
||||||
set -x
|
|
||||||
[ -z ${EXTRACTION_LENGTH} ] && EXTRACTION_LENGTH=6
|
[ -z ${EXTRACTION_LENGTH} ] && EXTRACTION_LENGTH=6
|
||||||
SPACER=$(echo "(${EXTRACTION_LENGTH} - 3 )/2" |bc -l)
|
SPACER=$(echo "scale=1;(${EXTRACTION_LENGTH} - 3 )/2" |bc -l)
|
||||||
START=$(echo "${START} - ${SPACER}"|bc -l)
|
START=$(echo "scale=1;${START} - ${SPACER}"|bc -l)
|
||||||
END=$(echo "${END} + ${SPACER}"|bc -l)
|
END=$(echo "scale=1;${END} + ${SPACER}"|bc -l)
|
||||||
|
|
||||||
if (( $(echo "${START} < 0" | bc -l) ));then START=0;fi
|
if (( $(echo "scale=1;${START} < 1" | bc -l) ));then START=0;fi
|
||||||
if (( $(echo "${END} > ${RECORDING_LENGTH}" | bc -l) ));then END=${RECORDING_LENGTH};fi
|
if (( $(echo "scale=1;${END} > ${RECORDING_LENGTH}" | bc -l) ));then END=${RECORDING_LENGTH};fi
|
||||||
|
|
||||||
set +x
|
|
||||||
ffmpeg -hide_banner -loglevel error -nostdin -i "${h}/${OLDFILE}" \
|
ffmpeg -hide_banner -loglevel error -nostdin -i "${h}/${OLDFILE}" \
|
||||||
-acodec copy -ss "${START}" -to "${END}"\
|
-acodec copy -ss "${START}" -to "${END}"\
|
||||||
"${NEWSPECIES_BYDATE}/${a}-${NEWFILE}"
|
"${NEWSPECIES_BYDATE}/${a}-${NEWFILE}"
|
||||||
|
|||||||
+20
-3
@@ -1,7 +1,24 @@
|
|||||||
<form action="/scripts/restart_services.php">
|
<form action="/scripts/restart_services.php">
|
||||||
<input type="submit" value="Restart BirdNET-system">
|
<input type="submit" value="Restart ALL BirdNET-system Services">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form action="/scripts/restart_services.php">
|
<form action="/scripts/restart_birdnet_analysis.php">
|
||||||
<input type="submit" value="Restart BirdNET-system">
|
<input type="submit" value="Restart BirdNET Analysis Service">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<form action="/scripts/restart_birdnet_recording.php">
|
||||||
|
<input type="submit" value="Restart Recording Service">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form action="/scripts/restart_extraction.php">
|
||||||
|
<input type="submit" value="Restart Extraction Service">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form action="/scripts/restart_caddy.php">
|
||||||
|
<input type="submit" value="Restart Caddy">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form action="/scripts/reboot_system.php">
|
||||||
|
<input type="submit" value="Reboot BirdNET-system">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
shell_exec("/home/pi/BirdNET-Lite/scripts/reboot_system.sh");
|
||||||
|
header('Location: http://birdnetsystem.local/scripts/index.html?success=true');
|
||||||
|
?>
|
||||||
Executable
+2
@@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
sudo reboot
|
||||||
@@ -1,9 +1,23 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Restart services
|
# Restarts ALL services and removes ALL unprocessed audio
|
||||||
source /etc/birdnet/birdnet.conf
|
source /etc/birdnet/birdnet.conf
|
||||||
|
|
||||||
sudo systemctl stop birdnet_recording.service
|
sudo systemctl stop birdnet_recording.service
|
||||||
sudo rm -rf ${RECS_DIR}/$(date +%B-%Y/%d-%A)/*
|
sudo rm -rf ${RECS_DIR}/$(date +%B-%Y/%d-%A)/*
|
||||||
sudo systemctl start birdnet_recording.service
|
sudo systemctl start birdnet_recording.service
|
||||||
sudo systemctl restart extraction.timer
|
|
||||||
sudo systemctl restart birdnet_analysis.service
|
SERVICES=(avahi-alias@birdlog.local.service
|
||||||
|
avahi-alias@birdnetsystem.local.service
|
||||||
|
avahi-alias@birdstats.local.service
|
||||||
|
avahi-alias@extractionlog.local.service
|
||||||
|
birdnet_analysis.service
|
||||||
|
birdnet_log.service
|
||||||
|
birdstats.service
|
||||||
|
extraction.timer
|
||||||
|
extractionlog.service
|
||||||
|
livestream.service)
|
||||||
|
|
||||||
|
for i in "${SERVICES[@]}";do
|
||||||
|
sudo systemctl restart ${i}
|
||||||
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
shell_exec("/home/pi/BirdNET-Lite/scripts/restart_birdnet_analysis.sh");
|
||||||
|
header('Location: http://birdnetsystem.local/scripts/index.html?success=true');
|
||||||
|
?>
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Restars the main BirdNET analysis service
|
||||||
|
sudo systemctl restart birdnet_analysis.service
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
shell_exec("/home/pi/BirdNET-Lite/scripts/restart_birdnet_recording.sh");
|
||||||
|
header('Location: http://birdnetsystem.local/scripts/index.html?success=true');
|
||||||
|
?>
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Restars the BirdNET Recording service
|
||||||
|
sudo systemctl restart birdnet_recording.service
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
shell_exec("/home/pi/BirdNET-Lite/scripts/restart_caddy.sh");
|
||||||
|
header('Location: http://birdnetsystem.local/scripts/index.html?success=true');
|
||||||
|
?>
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Restars the caddy webserver
|
||||||
|
sudo systemctl restart caddy
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
shell_exec("/home/pi/BirdNET-Lite/scripts/restart_extraction.sh");
|
||||||
|
header('Location: http://birdnetsystem.local/scripts/index.html?success=true');
|
||||||
|
?>
|
||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Restars the BirdNET Extraction service
|
||||||
|
sudo systemctl restart extraction.service
|
||||||
Reference in New Issue
Block a user