Unverified Commit 51a14691 authored by Emilio Garcia's avatar Emilio Garcia
Browse files

Updated start script

parent 230eab69
Pipeline #276248 passed with stage
in 1 minute and 28 seconds
#!/bin/bash
## This script will launch the main components for data-api (config, eureka, key, filedatabase)
## Please run the following components in debug mode: res, data-edge, htsget
#Save current dir for future usage
DIR=$(pwd)
RUNDIR=$DIR/local_run
......@@ -5,8 +11,10 @@ LOG_DIR=$RUNDIR/logs
mkdir -p $LOG_DIR
echo "Building project, not showing stdout"
# mvn clean install > /dev/null
echo "Building project with maven in background..."
mvn clean install > /dev/null
echo "Done \n"
#-------------------------------
echo "Launching config server..."
......@@ -53,9 +61,21 @@ echo "filedatabase: $!" >> $RUNDIR/process_ids.txt
#-------------------------------
echo "All processes started:"
echo ""
echo "All processes started: (process: PID)"
cat $RUNDIR/process_ids.txt
echo "Press a key to kill them all"
echo ""
echo "Logs: $LOG_DIR"
ls -ltrh $LOG_DIR
echo "\n"
read -n 1 -r -s -p $'Press enter to exit...'
#-------------------------------
echo "Killing all processes:"
PIDS="$(cat $RUNDIR/process_ids.txt | awk -F' ' '{print $2}' | paste -s -d' ')"
KILL_COMMAND="kill -9 $PIDS"
echo " -> $KILL_COMMAND"
eval $KILL_COMMAND
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