Option -d for faxreport

This commit is contained in:
Gandalf 2021-03-14 12:32:09 +01:00
parent 02779f34f7
commit b0d3413938

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