forked from folio-org/mod-inventory-storage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·35 lines (22 loc) · 783 Bytes
/
start.sh
File metadata and controls
executable file
·35 lines (22 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
port=${1:-9407}
config_path=${2:-"$(pwd)/demo-postgres-conf.json"}
tenant_id=${3:-demo_tenant}
rm output.log
echo "Building"
mvn clean install -DskipTests
java -jar target/inventory-storage-fat.jar db_connection=${config_path} -Dhttp.port=${port} 1>output.log 2>output.log &
echo "Waiting for inventory storage module to start"
until $(curl --output /dev/null --silent --get --fail -H "X-Okapi-Tenant: ${tenant_id}" http://localhost:${port}/_/tenant); do
printf '.'
sleep 1
done
echo
echo "Running"
echo "Initialising Tenant: ${tenant_id}"
curl -w '\n' -X POST -D - \
-H "Content-type: application/json" \
-H "Accept: */*" \
-H "X-Okapi-Tenant: ${tenant_id}" \
http://localhost:${port}/_/tenant
#tail -F output.log