From fe788c8a59957ee3ee5fc7c9626e479a36a14596 Mon Sep 17 00:00:00 2001 From: Pascal Date: Wed, 3 Feb 2021 13:43:12 +0100 Subject: [PATCH] Added usr local to crontab scritp --- common.sh | 1 + schedule_sat.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/common.sh b/common.sh index c0077ca..3288d4d 100755 --- a/common.sh +++ b/common.sh @@ -4,6 +4,7 @@ # set -x . "$HOME/.noaa.conf" +export PATH=$PATH:/usr/local/bin/ declare -A levels=([DEBUG]=0 [INFO]=1 [WARN]=2 [ERROR]=3) log_level=${LOG_LEVEL} diff --git a/schedule_sat.sh b/schedule_sat.sh index 2d69e5f..15abc6f 100755 --- a/schedule_sat.sh +++ b/schedule_sat.sh @@ -32,7 +32,11 @@ log "Looking for passes of $1" INFO PREDICTION_START=$(predict -t "${NOAA_HOME}"/predict/weather.tle -p "${1}" | head -1) PREDICTION_END=$(predict -t "${NOAA_HOME}"/predict/weather.tle -p "${1}" | tail -1) -[ -z "$PREDICTION_START" ] && log "predict did not return any values for $1!" ERROR +if [ -z "$PREDICTION_START" ]; then + log "predict did not return any values for $1!" ERROR + log "predict -t \"${NOAA_HOME}\"/predict/weather.tle -p \"${1}\"" ERROR + predict -t "${NOAA_HOME}"/predict/weather.tle -p "${1}" >> /var/log/noaa.log 2>&1 +fi var2=$(echo "${PREDICTION_END}" | cut -d " " -f 1)