Merge branch 'forms' of github.com:mcguirepr89/BirdNET-Pi into forms
merge
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# Runs BirdNET-Lite
|
||||
set -x
|
||||
#set -x
|
||||
source /etc/birdnet/birdnet.conf
|
||||
# Document this run's birdnet.conf settings
|
||||
# Make a temporary file to compare the current birdnet.conf with
|
||||
@@ -124,6 +124,12 @@ run_analysis() {
|
||||
done
|
||||
fi
|
||||
|
||||
if ! grep 5050 <(netstat -tulpn 2>&1) &> /dev/null 2>&1;then
|
||||
echo "Waiting for socket"
|
||||
until grep 5050 <(netstat -tulpn 2>&1) &> /dev/null 2>&1;do
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
if [ -f ${1}/${i} ] && [ ! -f ${INCLUDE_LIST} ] && [ ! -f ${EXCLUDE_LIST} ] && [ -z $BIRDWEATHER_ID ];then
|
||||
echo "python3 analyze.py \
|
||||
--i "${1}/${i}" \
|
||||
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
journalctl -o short -fu birdnet_analysis -u birdnet_server | sed "s/$(date "+%b %d ")//g"
|
||||
@@ -13,7 +13,11 @@ fi
|
||||
if pgrep arecord &> /dev/null ;then
|
||||
echo "Recording"
|
||||
else
|
||||
until grep 5050 <(netstat -tulpn 2>&1);do
|
||||
sleep 1
|
||||
done
|
||||
if [ -z ${REC_CARD} ];then
|
||||
|
||||
arecord -f S16_LE -c${CHANNELS} -r48000 -t wav --max-file-time ${RECORDING_LENGTH}\
|
||||
--use-strftime ${RECS_DIR}/%B-%Y/%d-%A/%F-birdnet-${STAMP}.wav
|
||||
else
|
||||
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
#Display network info for phpsysinfo
|
||||
|
||||
echo "........................................IPs....................................."
|
||||
echo "LAN IP: $(hostname -I|cut -d' ' -f1)"
|
||||
echo "Public IP: $(curl -s4 ifconfig.co)"
|
||||
echo "..................................\`vcgencmd stats\`.............................."
|
||||
sudo -upi vcgencmd get_throttled
|
||||
hex=$(sudo -upi vcgencmd get_throttled|cut -d'x' -f2)
|
||||
binary=$(echo "ibase=16;obase=2;$hex"|bc)
|
||||
echo "Binary: $binary";
|
||||
revbinary=$(echo $binary|rev)
|
||||
if echo $binary | grep 1 ;then
|
||||
echo "ISSUES DETECTED"
|
||||
if [ ${revbinary:0:1} -eq 1 ];then
|
||||
echo "Under-voltage detected"
|
||||
fi
|
||||
if [ ${revbinary:1:1} -eq 1 ];then
|
||||
echo "Arm frequency capped"
|
||||
fi
|
||||
if [ ${revbinary:2:1} -eq 1 ];then
|
||||
echo "Currently Throttled"
|
||||
fi
|
||||
if [ ${revbinary:3:1} -eq 1 ];then
|
||||
echo "Soft temperatue limit active"
|
||||
fi
|
||||
if [ ${revbinary:16:1} -eq 1 ];then
|
||||
echo "Under-voltage has occurred"
|
||||
fi
|
||||
if [ ${revbinary:17:1} -eq 1 ];then
|
||||
echo "Arm frequency capping has occurred"
|
||||
fi
|
||||
if [ ${revbinary:18:1} -eq 1 ];then
|
||||
echo "Throttling has occurred"
|
||||
fi
|
||||
if [ ${revbinary:19:1} -eq 1 ];then
|
||||
echo "Soft temperature limit has occurred"
|
||||
fi
|
||||
fi
|
||||
echo "....................................Clock Speeds................................"
|
||||
for i in arm core h264 isp v3d uart pwm emmc pixel vec hdmi dpi;do
|
||||
echo -e "${i}:\t$(sudo -upi vcgencmd measure_clock ${i})"
|
||||
done
|
||||
echo "........................................Volts..................................."
|
||||
for i in core sdram_c sdram_i sdram_p;do
|
||||
echo -e "${i}:\t$(sudo -upi vcgencmd measure_volts ${i})"
|
||||
done
|
||||
echo ".....................................Caddyfile.................................."
|
||||
cat /etc/caddy/Caddyfile
|
||||
echo ".................................... Crontab...................................."
|
||||
cat /etc/crontab | grep -ve '^#'
|
||||
@@ -418,7 +418,7 @@ RestartSec=3
|
||||
Type=simple
|
||||
User=${USER}
|
||||
Environment=TERM=xterm-256color
|
||||
ExecStart=/usr/local/bin/gotty -p 8080 --title-format "BirdNET-Pi Log" journalctl -o cat -fu birdnet_server.service
|
||||
ExecStart=/usr/local/bin/gotty -p 8080 --title-format "BirdNET-Pi Log" birdnet_log.sh
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#Display network info for phpsysinfo
|
||||
|
||||
echo "LAN IP: $(hostname -I|cut -d' ' -f1)"
|
||||
echo "Public IP: $(curl -s4 ifconfig.co)"
|
||||
echo
|
||||
echo "------------------------------"
|
||||
echo ' $(ip a) '
|
||||
ip a
|
||||
@@ -411,7 +411,7 @@ RestartSec=3
|
||||
Type=simple
|
||||
User=${USER}
|
||||
Environment=TERM=xterm-256color
|
||||
ExecStart=/usr/local/bin/gotty -p 8080 --title-format "BirdNET-Pi Log" journalctl -o cat -fu birdnet_server.service
|
||||
ExecStart=/usr/local/bin/gotty -p 8080 --title-format "BirdNET-Pi Log" birdnet_log.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user