Some small changes

This commit is contained in:
Gandalf 2021-03-04 20:41:00 +01:00
parent 43f57a263d
commit 9c974392be
3 changed files with 5 additions and 0 deletions

View file

@ -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. sipgate doesn't accept pdf files larger than 30 pages or 10MB.
~~For now, `<recipient>` has to be numbers-only, starting with `+49`. It is planned to parse different number formats.~~ Should be done. ~~For now, `<recipient>` 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. `balance.sh` just gives your account balance.

1
fax.sh
View file

@ -20,6 +20,7 @@ CONTENT=$(base64 $FILE -w 0)
if [ -z "$CONTENT" ]; if [ -z "$CONTENT" ];
then then
echo "Encoding failed" echo "Encoding failed"
exit 2
fi fi
DATA='{"faxlineId":"f0", "recipient":"'${REC}'", "filename":"fax.pdf", "base64Content":"'${CONTENT}'"}' DATA='{"faxlineId":"f0", "recipient":"'${REC}'", "filename":"fax.pdf", "base64Content":"'${CONTENT}'"}'
#Send fax #Send fax

View file

@ -10,3 +10,4 @@ do
TARGET=$(echo $JSON | jq '.target' | sed -e 's:"::g' ) TARGET=$(echo $JSON | jq '.target' | sed -e 's:"::g' )
echo "Fax $LINE vom $(date +%d.%m.%Y -d $DATE) an $TARGET: $STATUS" echo "Fax $LINE vom $(date +%d.%m.%Y -d $DATE) an $TARGET: $STATUS"
done < $BASEPATH/.fax_history done < $BASEPATH/.fax_history
echo "$(tail $BASEPATH/.fax_history)" > $BASEPATH/.fax_history