3 AGENTNUMS="1 2 3 5 8 9 10"
6 dir="/usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/cust_bill"
7 lock=".billco-upload.lock"
12 echo "billco-upload already running; exiting"
21 [ $(cat $lock 2>/dev/null) -eq $$ ] || failed_mutex
24 for AGENTNUM in $AGENTNUMS; do
26 for a in header detail; do
27 mv agentnum$AGENTNUM-$a.csv agentnum$AGENTNUM-$date-$a.csv
30 zip agentnum$AGENTNUM-$date.zip agentnum$AGENTNUM-$date-header.csv agentnum$AGENTNUM-$date-detail.csv
32 # Remove if trying to find problems with billco upload files
33 rm *$AGENTNUM-$date*.csv
35 echo $dir/agentnum$AGENTNUM-$date.zip