status.sh did mess up when switching between sipgate accounts. Fixed that

callerid
Gandalf 2021-03-11 11:00:58 +01:00
parent c6eca387c1
commit dabaae95cf
1 changed files with 5 additions and 0 deletions

View File

@ -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