fix: auto-fix linting issues

This commit is contained in:
alexbelgium
2025-07-28 09:53:42 +00:00
committed by github-actions[bot]
parent a18a505bfb
commit 2ca436f8e8
8 changed files with 10 additions and 10 deletions

View File

@@ -57,7 +57,7 @@ run_script() {
fi fi
# Replace s6-setuidgid with su fallback if s6-setuidgid is missing # Replace s6-setuidgid with su fallback if s6-setuidgid is missing
if ! command -v s6-setuidgid >/dev/null 2>&1; then if ! command -v s6-setuidgid > /dev/null 2>&1; then
sed -i -E 's|s6-setuidgid[[:space:]]+([a-zA-Z0-9._-]+)[[:space:]]+(.*)$|su -s /bin/bash \1 -c "\2"|g' "$runfile" sed -i -E 's|s6-setuidgid[[:space:]]+([a-zA-Z0-9._-]+)[[:space:]]+(.*)$|su -s /bin/bash \1 -c "\2"|g' "$runfile"
fi fi
@@ -114,21 +114,21 @@ if "$PID1"; then
if command -v pgrep &> /dev/null; then if command -v pgrep &> /dev/null; then
for pid in $(pgrep -P "$$"); do for pid in $(pgrep -P "$$"); do
echo "Terminating child PID $pid" echo "Terminating child PID $pid"
kill -TERM "$pid" 2>/dev/null || echo "Failed to terminate PID $pid" kill -TERM "$pid" 2> /dev/null || echo "Failed to terminate PID $pid"
done done
else else
for pid in /proc/[0-9]*/; do for pid in /proc/[0-9]*/; do
pid=${pid#/proc/} pid=${pid#/proc/}
pid=${pid%/} pid=${pid%/}
if [[ "$pid" -ne 1 ]] && grep -q "^PPid:\s*$$" "/proc/$pid/status" 2>/dev/null; then if [[ "$pid" -ne 1 ]] && grep -q "^PPid:\s*$$" "/proc/$pid/status" 2> /dev/null; then
echo "Terminating child PID $pid" echo "Terminating child PID $pid"
kill -TERM "$pid" 2>/dev/null || echo "Failed to terminate PID $pid" kill -TERM "$pid" 2> /dev/null || echo "Failed to terminate PID $pid"
fi fi
done done
fi fi
sleep 5 sleep 5
kill -KILL -$$ 2>/dev/null || true kill -KILL -$$ 2> /dev/null || true
wait wait
echo "All subprocesses terminated. Exiting." echo "All subprocesses terminated. Exiting."
exit 0 exit 0

View File

@@ -48,9 +48,9 @@ if export "$(grep "^DATABASE_LANG" /config/birdnet.conf)"; then
export "$(grep "^MODEL" /config/birdnet.conf)" export "$(grep "^MODEL" /config/birdnet.conf)"
bashio::log.info "Setting language to ${DATABASE_LANG:-en}" bashio::log.info "Setting language to ${DATABASE_LANG:-en}"
if [ "$MODEL" == "BirdNET_GLOBAL_6K_V2.4_Model_FP16" ]; then if [ "$MODEL" == "BirdNET_GLOBAL_6K_V2.4_Model_FP16" ]; then
BASEDIR=labels_nm BASEDIR=labels_nm
else else
BASEDIR=labels_l18n BASEDIR=labels_l18n
fi fi
label_file_name="labels_${DATABASE_LANG}.txt" label_file_name="labels_${DATABASE_LANG}.txt"
ln -sf "$HOME/BirdNET-Pi/model/${BASEDIR}/${label_file_name}" "$HOME/BirdNET-Pi/model/labels.txt" || bashio::log.warning "Failed to update language labels" ln -sf "$HOME/BirdNET-Pi/model/${BASEDIR}/${label_file_name}" "$HOME/BirdNET-Pi/model/labels.txt" || bashio::log.warning "Failed to update language labels"
@@ -168,4 +168,3 @@ grep -rl "RECS_DIR" "$HOME" --exclude="*.php" | while read -r file; do
sed -i "/^\$RECS_DIR=/c \$RECS_DIR=/tmp" "$file" sed -i "/^\$RECS_DIR=/c \$RECS_DIR=/tmp" "$file"
done done
mkdir -p /tmp mkdir -p /tmp

View File

@@ -3,13 +3,14 @@
import json import json
import logging import logging
import os
import re import re
import sys import sys
import os
import paho.mqtt.client as mqtt import paho.mqtt.client as mqtt
import requests import requests
utils_path = os.path.expanduser('~/BirdNET-Pi/scripts/utils') utils_path = os.path.expanduser("~/BirdNET-Pi/scripts/utils")
sys.path.append(utils_path) sys.path.append(utils_path)
from helpers import get_settings from helpers import get_settings

0
emby_beta/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
guacamole/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

View File

0
portainer/rootfs/etc/services.d/nginx/run Normal file → Executable file
View File

0
portainer/rootfs/etc/services.d/portainer/run Normal file → Executable file
View File