Skip to content

Instantly share code, notes, and snippets.

@tyler-smith
Last active May 14, 2020 18:07
Show Gist options
  • Save tyler-smith/bcccefb7ffb61ecf7b240c46e9e714fd to your computer and use it in GitHub Desktop.
Save tyler-smith/bcccefb7ffb61ecf7b240c46e9e714fd to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
# Examples:
# ./gecko-entrypoint.sh ./build/ava -api-ipcs-enabled=true
#
# docker run -v gecko-entrypoint.sh:/gecko-entrypoint.sh --entrypoint /gecko-entrypoint.sh avaplatform/gecko ./build/ava -api-ipcs-enabled=true
# Attempt to enable IPC continuously
(while true
do
curl -s -X POST --data '{"jsonrpc": "2.0","method": "ipcs.publishBlockchain","params":{"blockchainID":"11111111111111111111111111111111LpoYY"},"id": 1}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/ipcs || true
curl -s -X POST --data '{"jsonrpc": "2.0","method": "ipcs.publishBlockchain","params":{"blockchainID":"4ktRjsAKxgMr2aEzv9SWmrU7Xk5FniHUrVCX4P1TZSfTLZWFM"},"id": 1}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/ipcs || true
sleep 5
done)&
# Start Gecko
exec "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment