diff options
author | jeff <jeff> | 2009-08-12 14:58:50 +0000 |
---|---|---|
committer | jeff <jeff> | 2009-08-12 14:58:50 +0000 |
commit | 56a2965996454a0649d43ecbc062beda61106e21 (patch) | |
tree | 12c4c2167844a44b09ff5da4cf2bf128cdcf2bc7 /bin | |
parent | 600a15aa56c212e1206fced9cbcf9de103c2f95b (diff) |
internalize billco-upload and automate the transfer to the provider RT#5902
Diffstat (limited to 'bin')
-rw-r--r-- | bin/billco-upload | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/bin/billco-upload b/bin/billco-upload deleted file mode 100644 index 3a02ec8bb..000000000 --- a/bin/billco-upload +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -AGENTNUMS="1 2 3 5 8 9 10" - -date=`date +"%Y%m%d"` -dir="/usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/cust_bill" -lock=".billco-upload.lock" -cd "$dir" - -failed_mutex() -{ - echo "billco-upload already running; exiting" - exit 1 -} - -#acquire mutex -[ -f $lock ] && { - failed_mutex -} || { - echo $$ > $lock - [ $(cat $lock 2>/dev/null) -eq $$ ] || failed_mutex -} - -for AGENTNUM in $AGENTNUMS; do - - for a in header detail; do - mv agentnum$AGENTNUM-$a.csv agentnum$AGENTNUM-$date-$a.csv - done - - zip agentnum$AGENTNUM-$date.zip agentnum$AGENTNUM-$date-header.csv agentnum$AGENTNUM-$date-detail.csv - -# Remove if trying to find problems with billco upload files - rm *$AGENTNUM-$date*.csv - - echo $dir/agentnum$AGENTNUM-$date.zip - -done - -#release mutex -rm -f $lock |