From bc9e251fdd0852ca5d673ec259e881f523694212 Mon Sep 17 00:00:00 2001 From: Trek Hopton Date: Fri, 16 Feb 2024 16:18:19 +1030 Subject: [PATCH] scuhu: modify service to run exp/i2s looping 10 min recordings --- exp/i2s/main.go | 2 +- scripts/scuhu_run.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exp/i2s/main.go b/exp/i2s/main.go index b9c75ffd..419e8176 100644 --- a/exp/i2s/main.go +++ b/exp/i2s/main.go @@ -113,7 +113,7 @@ func main() { } log.Println("Recording stopped.") - fileName := "recordings/audio-" + time.Now().Format("2006-01-02_15-04-05") + ".wav" + fileName := "/home/pi/recordings/audio-" + time.Now().Format("2006-01-02_15-04-05") + ".wav" file, err := os.Create(fileName) if err != nil { log.Println("failed to create file:", err) diff --git a/scripts/scuhu_run.sh b/scripts/scuhu_run.sh index d4db92a9..60f2f360 100755 --- a/scripts/scuhu_run.sh +++ b/scripts/scuhu_run.sh @@ -1,7 +1,7 @@ #!/bin/sh -e # This script configures and runs a binary on a pi, intended to run at boot time. -BINNAME=rvcl -ARGS="-config-file config-scuhu.json" +BINNAME=i2s +ARGS="" echo Set kernel parameters: # kernel settings to improve performance on Raspberry Pi @@ -29,7 +29,7 @@ echo Our IP addresses: sudo ip addr show | grep inet # capture stdout and stderr to a secondary log file (just in case) -exec 2> /var/log/netsender/stream.log +exec 2>> /var/log/netsender/stream.log exec 1>&2 # set env, working dir and run as pi user