mirror of
https://github.com/bpmforge/kryptkeeper.git
synced 2026-11-23 16:02:01 +00:00
e0d82a4ed0
First stable release. Notes: docs/release/RELEASE_NOTES_v1.0.0.md Lab record: docs/release/LIVE_RESULTS_v1.0.0.md
13 lines
763 B
Bash
13 lines
763 B
Bash
#!/usr/bin/env bash
|
|
# fresh.sh NAME HUBPORT UIPORT DATADIR : wipe DATADIR, start a hub and seed the demo data.
|
|
# Needs RUN and BIN env (see hub.sh). Stops only the PIDs recorded under $RUN.
|
|
set -euo pipefail
|
|
H="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"; REPO="$H/../../.."
|
|
name=$1; hp=$2; up=$3; data=$4
|
|
bash "$H/hub.sh" stop "$name" hub || true
|
|
[ -f "$RUN/$name.seed.pids" ] && { kill $(cat "$RUN/$name.seed.pids") 2>/dev/null || true; }
|
|
sleep 1; rm -rf "$data" "$data.cwd"
|
|
bash "$H/hub.sh" start "$name" "$hp" "$up" "$data"
|
|
BASE_URL="http://127.0.0.1:$hp" TOKEN=dev-token PIDFILE="$RUN/$name.seed.pids" bash "$REPO/scripts/dev/seed-demo.sh" >"$RUN/$name.seed.log" 2>&1 || { tail -20 "$RUN/$name.seed.log"; exit 1; }
|
|
tail -3 "$RUN/$name.seed.log" | head -1
|