entrypoint.sh 294 B

123456789101112131415
  1. #!/bin/sh
  2. set -e
  3. [ -z "$OR_PORT" ] && echo '$OR_PORT undefined' && exit 1
  4. [ -z "$PT_PORT" ] && echo '$PT_PORT undefined' && exit 1
  5. set -x
  6. sed -e "s#{OR_PORT}#$OR_PORT#" \
  7. -e "s#{PT_PORT}#$PT_PORT#" \
  8. -e "s#{CONTACT_INFO}#$CONTACT_INFO#" \
  9. /torrc.template >/tmp/torrc
  10. exec "$@"