Option -d for faxreport

callerid
Gandalf 2021-03-14 12:32:09 +01:00
parent 02779f34f7
commit b0d3413938
1 changed files with 15 additions and 1 deletions

View File

@ -51,8 +51,22 @@ OUTFILE="$DATE-$ID-report.pdf"
if [ -z $FILE ]
then
echo "Fax seems not to be sent successfully (yet). No report available"
read -p "Delete id from history anyways? (y/n) " DIN
if [[ $DF = true && $DIN =~ [yYjJ] ]]
then
echo "$(grep -v "^$ID$" $BASEPATH/.fax_history)" > $BASEPATH/.fax_history
fi
exit 1
else
fi
if [ $PF = false ]
then
echo "Speichere Report in $OUTFILE"
curl $FILE --output $OUTFILE -s
else
echo "Schicke Report an Drucker"
curl $FILE -s --output - | ln
fi
if [ $DF = true ]
then
grep -v $ID $BASEPATH/.fax_history > $BASEPATH/.fax_history
fi