start_radicle.sh 531 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. CONFIG="${RAD_HOME}/config.json"
  3. # Create a profile
  4. echo "$RAD_PASSPHRASE" | rad auth --stdin --alias "$HOSTNAME"
  5. if [ "$RAD_SEEDING_POLICY" = 'allow' ]; then
  6. jq '.node.seedingPolicy.default = "allow"' "$CONFIG" | sponge "$CONFIG"
  7. fi
  8. jq '.node.externalAddresses = ["'"${HOSTNAME}:8776"'"]' "$CONFIG" | sponge "$CONFIG"
  9. jq '.node.listen = ["0.0.0.0:8776"]' "$CONFIG" | sponge "$CONFIG"
  10. rad node start -- --listen "0.0.0.0:8776"
  11. # Print information about this node
  12. rad self
  13. # Start HTTPd server
  14. radicle-httpd