1 |
#! /bin/bash |
2 |
# |
3 |
# Front end to scp and ssh commands to get any CCF package (as tgz) from the |
4 |
# /data/xmm/ccflib/incoming directory when somebody makes any CCF in DMZ. |
5 |
# The tgz file must also be removed, otherwise it will continue bringing it |
6 |
# to the ccflib incoming in sasbld01n. |
7 |
# |
8 |
# This script is put under control of the crontab |
9 |
# |
10 |
# $Id$ |
11 |
|
12 |
incoming_ccflib_tgz_files=`/usr/bin/ssh ccflib@xmm.esac.esa.int "ls incoming | grep -c tgz"` |
13 |
if [ "${incoming_ccflib_tgz_files}" != "0" ] ; then |
14 |
/usr/bin/scp ccflib@xmm.esac.esa.int:/data/xmm/ccflib/incoming/*.tgz /home/ccflib/incoming/ |
15 |
/usr/bin/ssh ccflib@xmm.esac.esa.int "rm /data/xmm/ccflib/incoming/*.tgz" |
16 |
fi |
17 |
|