From 0b323a8666e8a19be3434e9b02cc14d68dae3b29 Mon Sep 17 00:00:00 2001 From: Pascal Date: Mon, 1 Feb 2021 14:02:31 +0100 Subject: [PATCH] Added variable noa logfile --- common.sh | 2 +- receive_meteor.sh | 2 +- templates/noaa.conf | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common.sh b/common.sh index ae4cd42..c0077ca 100755 --- a/common.sh +++ b/common.sh @@ -21,7 +21,7 @@ log() { #log here echo "${log_priority} : ${log_message}" - echo $(date '+%d-%m-%Y %H:%M') $0 "${log_priority} : ${log_message}" >> /var/log/noaa.log + echo $(date '+%d-%m-%Y %H:%M') $0 "${log_priority} : ${log_message}" >> "$NOAA_LOG" } ## current date and folder structure diff --git a/receive_meteor.sh b/receive_meteor.sh index c6c8767..7ae6049 100755 --- a/receive_meteor.sh +++ b/receive_meteor.sh @@ -47,7 +47,7 @@ timeout "${6}" /usr/local/bin/rtl_fm ${BIAS_TEE} -p $PPM_ERROR -M raw -f "${2}"M log "Demodulation in progress (QPSK)" "INFO" [ $1 = "METEOR-M2 2"] && demod_extra="-m opsk" -meteor_demod $demod_extra -B -o "${METEOR_OUTPUT}/${3}.qpsk" "${RAMFS_AUDIO}/audio/${3}.wav" +meteor_demod $demod_extra -B -o "${METEOR_OUTPUT}/${3}.qpsk" "${RAMFS_AUDIO}/audio/${3}.wav" 2>> $NOAA_LOG if [ "$DELETE_AUDIO" = true ]; then log "Deleting audio files" "INFO" diff --git a/templates/noaa.conf b/templates/noaa.conf index 5d1d539..0bb5200 100644 --- a/templates/noaa.conf +++ b/templates/noaa.conf @@ -1,5 +1,6 @@ NOAA_HOME=/home/pi/raspberry-noaa NOAA_OUTPUT=/var/www/wx +NOAA_LOG=/var/log/noaa.log METEOR_OUTPUT=/var/www/wx/meteor RAMFS_AUDIO=/var/ramfs SAT_MIN_ELEV=30