diff --git a/README.md b/README.md index 6a302b3..5924a81 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,9 @@ Add your login credentials to `login_credentials_muster.sh` and rename the file sipgate doesn't accept pdf files larger than 30 pages or 10MB. ~~For now, `` has to be numbers-only, starting with `+49`. It is planned to parse different number formats.~~ Should be done. +Spaces in filename seem to make trouble at the moment - avoid them. + +`status.sh` shows ID, Date and Status of the last ten fax set from this device. `balance.sh` just gives your account balance. diff --git a/fax.sh b/fax.sh index 72cfef4..6962bad 100755 --- a/fax.sh +++ b/fax.sh @@ -20,6 +20,7 @@ CONTENT=$(base64 $FILE -w 0) if [ -z "$CONTENT" ]; then echo "Encoding failed" + exit 2 fi DATA='{"faxlineId":"f0", "recipient":"'${REC}'", "filename":"fax.pdf", "base64Content":"'${CONTENT}'"}' #Send fax diff --git a/status.sh b/status.sh index e5c7ae0..a478966 100755 --- a/status.sh +++ b/status.sh @@ -10,3 +10,4 @@ do TARGET=$(echo $JSON | jq '.target' | sed -e 's:"::g' ) 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