2022-10-11 06:19:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Print all commands to standard output
|
|
|
|
set -x
|
|
|
|
|
|
|
|
SCRIPT_PATH=/home/pi/hydrophonitor/scripts
|
2022-08-20 13:40:10 +00:00
|
|
|
|
2022-10-03 16:37:15 +00:00
|
|
|
# Export the configuration values
|
2022-10-23 14:03:54 +00:00
|
|
|
. $SCRIPT_PATH/export-config-values.sh
|
2022-10-03 16:37:15 +00:00
|
|
|
|
|
|
|
# Create output directory
|
2022-10-22 12:54:50 +00:00
|
|
|
OUTPUT_DIR=$OUTPUT_PATH/$(date +"%Y-%m-%d_%H-%M-%S_output")
|
2022-10-11 06:19:01 +00:00
|
|
|
echo "Create output directory $OUTPUT_DIR"
|
|
|
|
mkdir -p "$OUTPUT_DIR"/audio
|
2022-10-04 18:12:00 +00:00
|
|
|
|
2022-10-04 18:24:42 +00:00
|
|
|
# Sleep for a little to wait for GPS and sound card to be ready
|
2022-10-04 18:12:00 +00:00
|
|
|
sleep 10
|
|
|
|
|
2022-10-11 06:19:01 +00:00
|
|
|
(export OUTPUT_DIR=$OUTPUT_DIR; $SCRIPT_PATH/start-audio.sh & $SCRIPT_PATH/start-gps.sh & $SCRIPT_PATH/start-pressure-depth.sh) >> "$OUTPUT_DIR"/log.txt 2>&1
|