[HELP] openwrt-recording port

Hi everyone,
I really need your help to “port” this cool configurarion+script to run inside a stripped-down (= no DE needed) version of DietPi on a Raspberry Pi 3B+ in order to be able to AUTOMATICALLY record up to 32 channels 24bit 48KHz (~37 Mbps = 5 MB/s, means ~18 GB/h).

openwrt-recording

Thanks to anyone that will help.

OK, since I’m a total Bash noob, I asked copilot to suggest me how to convert the script and here’s the (shortened) result:

  1. Install required packages sudo apt-get update sudo apt-get install alsa-utils usbutils moreutils libtime-hires-perl
  2. Put scripts in: sudo cp recorder /usr/sbin/ sudo cp initscript /etc/init.d/autorecorder sudo cp hotplug /etc/hotplug.d/block/ sudo cp hotplug /etc/hotplug.d/usb/
  3. Enable init script: sudo update-rc.d autorecorder defaults
  4. Configure “hotplug” script: sudo nano /etc/udev/rules.d/99-recording.rules and add ACTION=="add", SUBSYSTEM=="usb", RUN+="/usr/local/bin/run-recording"
  5. Recording script: sudo nano /usr/local/bin/run-recording and run #!/bin/bash arecord -D hw:1,0 -f cd -t raw | /usr/local/bin/raw2tracks

I doubt this can work “as is” but can be a reasonable starting point ?

Thanks again any help you can provide.