summaryrefslogtreecommitdiffstats
path: root/components/datalake-handler/feeder/src/assembly/run.sh
blob: 0cef6b48853dcf51667eb9a414c13d7d37c49d5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

echo "start init db ..."

export PGPASSWORD=$PG_PASSWORD

sh db_init/11_create-database
sh db_init/20_db-initdb

echo "finish init db"

cmd=`find . -name feeder*-exec.jar`
cmd1=`find . -regex '\./feeder-[0-9]+\.[0-9]+\.[0-9]+\-exec.jar'`
if [ -n "$cmd" ]; then
    java -jar $cmd
elif [ -n "$cmd1" ]; then
    java -jar $cmd1
else
    echo "STRING is empty"
    sleep 10000
fi