From dabaae95cf00fbe404296f83684a288a1fd363fa Mon Sep 17 00:00:00 2001 From: Gandalf Date: Thu, 11 Mar 2021 11:00:58 +0100 Subject: [PATCH] status.sh did mess up when switching between sipgate accounts. Fixed that --- status.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/status.sh b/status.sh index a478966..0c0c133 100755 --- a/status.sh +++ b/status.sh @@ -8,6 +8,11 @@ do STATUS=$(echo $JSON | jq '.faxStatusType' | sed -e 's:"::g' ) DATE=$(echo $JSON | jq '.created' | sed -e 's:"::g' ) TARGET=$(echo $JSON | jq '.target' | sed -e 's:"::g' ) + if [ -z $DATE ] + then + echo "Are you sure fax $LINE was sent from the logged in account? I cannot find it, so I'll skip it." + continue + fi echo "Fax $LINE vom $(date +%d.%m.%Y -d $DATE) an $TARGET: $STATUS" done < $BASEPATH/.fax_history echo "$(tail $BASEPATH/.fax_history)" > $BASEPATH/.fax_history