From: Bill Erickson Date: Wed, 8 May 2019 20:31:32 +0000 (+0000) Subject: Invoice export deletes previous day's local file X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=eb20ea395803757ba06cbba6994a82af349e84e3;p=working%2FEvergreen.git Invoice export deletes previous day's local file Keep only the most recent invoice export CVS file on the source (utility) server in case of delivery failure to prod-depot. Signed-off-by: Bill Erickson --- diff --git a/KCLS/utility-scripts/export_invoices/export_invoices.sh b/KCLS/utility-scripts/export_invoices/export_invoices.sh index 7ae034322a..d3aa6606e9 100755 --- a/KCLS/utility-scripts/export_invoices/export_invoices.sh +++ b/KCLS/utility-scripts/export_invoices/export_invoices.sh @@ -17,5 +17,10 @@ echo "CSV export file created: $CSV_FILE" scp "$CSV_FILE" prod-depot.eg.kcls.org:/home/sftpinv/pending/ +# Remove yesterday's CSV export file +rm -f /tmp/invoice-export.*.csv.delete_me +# Tag today's file as deletable +mv "$CSV_FILE" "$CSV_FILE.delete_me" + echo -n "Invoice exports complete " date +"%F %T"