Browse Source

Use logging

tags/v1.3
Nico Rey 4 years ago
parent
commit
a059e400c1
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      test_reception.sh

+ 6
- 6
test_reception.sh View File

@@ -1,13 +1,17 @@
#!/bin/bash #!/bin/bash


## import common lib
. "$HOME/.noaa.conf"
. "$NOAA_HOME/common.sh"

if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Usage: $0 <frequency>. Example: $0 90.3"
log "Usage: $0 <frequency>. Example: $0 90.3" "ERROR"
exit 1 exit 1
fi fi


command_exists() { command_exists() {
if ! command -v "$1" &> /dev/null; then if ! command -v "$1" &> /dev/null; then
echo "Required command not found: $1" "ERROR"
log "Required command not found: $1" "ERROR"
exit 1 exit 1
fi fi
} }
@@ -15,10 +19,6 @@ command_exists() {
command_exists "sox" command_exists "sox"
command_exists "socat" command_exists "socat"


## import common lib
. "$HOME/.noaa.conf"
. "$NOAA_HOME/common.sh"

IP=$(ip route | grep "link src" | awk {'print $NF'}) IP=$(ip route | grep "link src" | awk {'print $NF'})


if pgrep "rtl_fm" > /dev/null if pgrep "rtl_fm" > /dev/null


Loading…
Cancel
Save