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
|
|
|
|
|
2020-07-17 05:41:04 +00:00
|
|
|
ACME_RELAY_URL=${ACME_RELAY_URL:-"https://devices.examples.com"}
|
|
|
|
AUTH_URL=${AUTH_URL:-"https://devices.examples.com"}
|
2020-06-29 08:43:46 +00:00
|
|
|
CLIENT_SECRET=${CLIENT_SECRET:-"yyyyyyyyyyyyyyyy"}
|
|
|
|
|
|
|
|
./telebit --acme-agree=true \
|
2020-07-17 05:41:04 +00:00
|
|
|
--acme-relay-url $ACME_RELAY_URL/api \
|
|
|
|
--auth-url $AUTH_URL/api \
|
2020-06-29 08:43:46 +00:00
|
|
|
--app-id test-id --secret "$CLIENT_SECRET"
|