entrypoint.sh 447 B

12345678910111213141516
  1. #!/bin/sh
  2. if [ ! -e "$IPFS_PATH/config" ]; then
  3. (set -x; ipfs init --empty-repo --profile $IPFS_INIT_PROFILE)
  4. fi
  5. if [ "$IPFS_SWARM_ADDRS" != "default" ]; then
  6. addrs_json=$(jq --null-input --compact-output '$ARGS.positional' --args $IPFS_SWARM_ADDRS)
  7. (set -x; ipfs config --json Addresses.Swarm "$addrs_json")
  8. fi
  9. if [ ! -z "$IPFS_BOOTSTRAP_ADD" ]; then
  10. (set -x; ipfs bootstrap add -- $IPFS_BOOTSTRAP_ADD)
  11. fi
  12. (set -x; exec "$@")