added ssh recipient and user vars
[Evergreen.git] / Evergreen / src / support-scripts / eg_gen_overdue.sh
index 1f1f449..e4e7b40 100755 (executable)
@@ -8,11 +8,12 @@
 
 
 
+SSH_CLIENT=$1
+RECIPIENT=$2;
 DATE=$(date +%Y-%m-%d);
 DAY=$(date +%u);
 BSCONFIG="/openils/conf/bootstrap.conf"
 ODDIR="/openils/var/data/overdue";
-#ODDIR="/tmp";
 
 export EG_OVERDUE_EMAIL_TEMPLATE="../extras/overdue_notice_email";
 export EG_OVERDUE_SMTP_HOST="apollo.georgialibraries.org";
@@ -27,4 +28,5 @@ if [ $DAY == 1 ]; then ARGS="2 1 0"; fi; # If today is monday, run for sat/sun/m
 
 echo "RUNNING";
 ./eg_gen_overdue.pl $BSCONFIG $ARGS > "$ODDIR/overdue.$DATE.xml"
+scp "$ODDIR/overdue.$DATE.xml" "${SSH_CLIENT}\@${RECIPIENT}:~/"