Commit f533a16e authored by Nick Bearson's avatar Nick Bearson
Browse files

added some logging

parent ba671cb5
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
set -u set -u
set -e set -e
LOG=/home/eodn/eodn2realearth/log/ingest.log
exec >> $LOG 2>&1
INCOMING=/home/eodn/eodn2realearth/incoming INCOMING=/home/eodn/eodn2realearth/incoming
PROCESSING=/home/eodn/eodn2realearth/processing PROCESSING=/home/eodn/eodn2realearth/processing
QUARANTINE=/home/eodn/eodn2realearth/quarantine QUARANTINE=/home/eodn/eodn2realearth/quarantine
...@@ -12,8 +15,10 @@ filename=$(basename $filepath) ...@@ -12,8 +15,10 @@ filename=$(basename $filepath)
# set $SCRIPT based on input type # set $SCRIPT based on input type
if [ ${filename:0:2} == "LC" ] && [ ${filename: -4} == ".zip" ]; then # landsat zip files if [ ${filename:0:2} == "LC" ] && [ ${filename: -4} == ".zip" ]; then # landsat zip files
echo "SAW LANDSAT ZIP: ${filename}"
SCRIPT="bash -x /home/eodn/eodn2realearth/src/process-LCzip.sh" SCRIPT="bash -x /home/eodn/eodn2realearth/src/process-LCzip.sh"
else # not recognized else # not recognized
echo "QUARANTINE (NOT RECOGNIZED): ${filename}"
mkdir -p ${QUARANTINE} mkdir -p ${QUARANTINE}
mv $filepath ${QUARANTINE}/${filename} mv $filepath ${QUARANTINE}/${filename}
exit 0 exit 0
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
set -u set -u
set -e set -e
LOG=/home/eodn/eodn2realearth/log/process-LCzip.log
exec >> $LOG 2>&1
WMSUPLOAD=/home/eodn/eodn2realearth/src/wmsupload WMSUPLOAD=/home/eodn/eodn2realearth/src/wmsupload
SCENE=$1 SCENE=$1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment