-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script to run sandbox conductor and chc service concurrently
- Loading branch information
Showing
3 changed files
with
37 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
# array to store background process PIDs | ||
pids=() | ||
|
||
# cleanup function | ||
clean_up() { | ||
echo "Cleaning up..." | ||
for pid in "${pids[@]}"; do | ||
kill "$pid" 2>/dev/null | ||
done | ||
exit | ||
} | ||
|
||
# set up trap for multiple signals | ||
trap clean_up INT TERM | ||
|
||
# start hc-chc-service | ||
hc-chc-service --port 8181 & | ||
pids+=($!) | ||
sleep 1 | ||
|
||
# start hc-sandbox | ||
hc s clean && echo "1234" | hc s --piped create --chc-url http://localhost:8181 && echo "1234" | hc s --piped -f 8888 run & | ||
pids+=($!) | ||
|
||
wait |