Commit 0dcf518f authored by Nick Bearson's avatar Nick Bearson
Browse files

added a constants file so we only have to define directories once

parent fcf887d3
#!/usr/bin/env bash
readonly INCOMING=/home/eodn/eodn2realearth/incoming
readonly PROCESSING=/home/eodn/eodn2realearth/processing
readonly QUARANTINE=/home/eodn/eodn2realearth/quarantine
readonly LOGS=/home/eodn/eodn2realearth/logs
......@@ -3,12 +3,12 @@
set -u
set -e
LOG=/home/eodn/eodn2realearth/logs/ingest.log
exec >> $LOG 2>&1
DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
. "$DIR/consts.sh"
INCOMING=/home/eodn/eodn2realearth/incoming
PROCESSING=/home/eodn/eodn2realearth/processing
QUARANTINE=/home/eodn/eodn2realearth/quarantine
LOG=${LOGS}/ingest.log
exec >> $LOG 2>&1
filepath=$(readlink -f $1)
filename=$(basename $filepath)
......
......@@ -3,10 +3,15 @@
set -u
set -e
LOG=/home/eodn/eodn2realearth/logs/process-LCzip.log
DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
. "$DIR/consts.sh"
LOG=${LOGS}/process-LCzip.log
exec >> $LOG 2>&1
WMSUPLOAD=/home/eodn/eodn2realearth/src/wmsupload
WMSUPLOAD=${DIR}/wmsupload
SCENE=$1
echo "PROCESSING: $1"
......
#!/usr/bin/env bash
DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
. "$DIR/consts.sh"
# check that incron is running
pgrep "incrond" > /dev/null || echo "WARNING: incrond isn't running, is incoming being watched?"
# make & move to incoming
mkdir -p /home/eodn/eodn2realearth/incoming
cd /home/eodn/eodn2realearth/incoming
mkdir -p ${INCOMING}
cd ${INCOMING}
# start eodn_feed
nohup eodn_feed 0<&- &>> /home/eodn/eodn2realearth/logs/eodn_feed.log &
nohup eodn_feed 0<&- &>> ${LOGS}/eodn_feed.log &
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