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