chore: code cleanup
All checks were successful
Cross-Compile Binaries / compile-linux (push) Successful in 4m38s
Cross-Compile Binaries / compile-windows (push) Successful in 10m55s

This commit is contained in:
2026-02-12 16:49:52 +01:00
parent 2d04cb04d4
commit f19ceabd4a
2 changed files with 8 additions and 4 deletions

4
bin/disable-usb.sh Normal file → Executable file
View File

@@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
echo -e "[ \033[34mSYSTEMEC\033[0m ] Disabling USB devices..." | tee /dev/console
for dev in /sys/bus/usb/devices/*; do for dev in /sys/bus/usb/devices/*; do
# Only match main device entries (no colon) # Only match main device entries (no colon)
if [[ $(basename "$dev") =~ ^[0-9]+-[0-9]+$ ]]; then if [[ $(basename "$dev") =~ ^[0-9]+-[0-9]+$ ]]; then
@@ -14,3 +16,5 @@ for dev in /sys/bus/usb/devices/*; do
fi fi
fi fi
done done
echo -e "[ \033[34mSYSTEMEC\033[0m ] Disabled the USB devices at kernel level." | tee /dev/console

View File

@@ -58,7 +58,7 @@ case "$3" in
media_file_ext="${media_file##*.}" media_file_ext="${media_file##*.}"
echo "New media file: $media_file" echo "New media file: $media_file"
old_file=$(find /opt/raspscreen/media/current -type f \( -iname "*.pptx" -o -iname "*.odp" \)) old_file=$(find /opt/raspscreen/media/current -type f \( -iname "*.mp4" -o -iname "*.mkv" -o -iname "*.mov" -o -iname "*.webm" -o -iname "*.pptx" -o -iname "*.odp" \))
echo "Old file: $old_file" echo "Old file: $old_file"
echo "Copying new media into staging area..." echo "Copying new media into staging area..."
@@ -86,7 +86,7 @@ case "$3" in
media_file_ext="${media_file##*.}" media_file_ext="${media_file##*.}"
echo "New media file: $media_file" echo "New media file: $media_file"
old_file=$(find /opt/raspscreen/media/current -type f \( -iname "*.mp4" -o -iname "*.mkv" -o -iname "*.mov" -o -iname "*.webm" \)) old_file=$(find /opt/raspscreen/media/current -type f \( -iname "*.mp4" -o -iname "*.mkv" -o -iname "*.mov" -o -iname "*.webm" -o -iname "*.pptx" -o -iname "*.odp" \))
echo "Old file: $old_file" echo "Old file: $old_file"
echo "Copying new media into staging area..." echo "Copying new media into staging area..."