telebit/examples/run-as-relay.sh

20 lines
427 B
Bash
Raw Normal View History

2020-06-29 08:43:46 +00:00
#!/bin/bash
set -e
set -u
go generate -mod=vendor ./...
go build -mod=vendor -o telebit cmd/telebit/*.go
source .env
ADMIN_HOSTNAME=${ADMIN_HOSTNAME:-"devices.example.com"}
AUTH_BASEURL=${AUTH_BASEURL:-"https://devices.example.com"}
SECRET=${SECRET:-"xxxxxxxxxxxxxxxx"}
./telebit --acme-agree=true \
--admin-hostname $ADMIN_HOSTNAME \
--auth-url $AUTH_BASEURL/api \
--secret "$SECRET" \
--listen 3020,3030