update config

This commit is contained in:
AJ ONeal 2018-05-26 08:07:49 +00:00
parent d566a06cb3
commit 28944a6933
4 changed files with 22 additions and 19 deletions

View File

@ -120,15 +120,15 @@ function applyConfig(config) {
state.greenlock = Greenlock.create({ state.greenlock = Greenlock.create({
version: 'draft-11' version: state.config.greenlock.version || 'draft-11'
, server: 'https://acme-v02.api.letsencrypt.org/directory' , server: state.config.greenlock.server || 'https://acme-v02.api.letsencrypt.org/directory'
//, server: 'https://acme-staging-v02.api.letsencrypt.org/directory' //, server: 'https://acme-staging-v02.api.letsencrypt.org/directory'
, store: require('le-store-certbot').create({ debug: true, webrootPath: '/tmp/acme-challenges' }) , store: require('le-store-certbot').create({ debug: true, webrootPath: '/tmp/acme-challenges' })
, approveDomains: approveDomains , approveDomains: approveDomains
, configDir: state.config.configDir , configDir: state.config.greenlock.configDir
, debug: true , debug: true
//, approvedDomains: program.servernames //, approvedDomains: program.servernames

View File

@ -1,12 +1,15 @@
email: 'jon@example.com' # must be valid (for certificate recovery and security alerts) email: 'jon@example.com' # must be valid (for certificate recovery and security alerts)
agree_tos: true # agree to the Telebit, Greenlock, and Let's Encrypt TOSes agree_tos: true # agree to the Telebit, Greenlock, and Let's Encrypt TOSes
community_member: true # receive infrequent relevant updates community_member: true # receive infrequent relevant updates
telemetry: true # contribute to project telemetric data telemetry: true # contribute to project telemetric data
servernames: # hostnames that direct to the Telebit Relay admin console servernames: # hostnames that direct to the Telebit Relay admin console
- telebit.example.com - telebit.example.com
- telebit.example.net - telebit.example.net
vhost: /srv/www/:hostname # load secure websites at this path (uses template string, i.e. /var/www/:hostname/public) vhost: /srv/www/:hostname # load secure websites at this path (uses template string, i.e. /var/www/:hostname/public)
greenlock: greenlock:
store: le-store-certbot # certificate storage plugin version: 'draft-11'
config_dir: /etc/acme # directory for ssl certificates server: 'https://acme-v02.api.letsencrypt.org/directory'
secret: '' # generate with node -e "console.log(crypto.randomBytes(16).toString('hex'))" store:
strategy: le-store-certbot # certificate storage plugin
config_dir: /etc/acme # directory for ssl certificates
secret: '' # generate with node -e "console.log(crypto.randomBytes(16).toString('hex'))"

View File

@ -3,5 +3,8 @@ community_member: true
telemetry: true telemetry: true
vhost: /srv/www/:hostname vhost: /srv/www/:hostname
greenlock: greenlock:
store: le-store-certbot version: 'draft-11'
server: 'https://acme-v02.api.letsencrypt.org/directory'
store:
strategy: le-store-certbot
config_dir: /opt/telebitd/acme config_dir: /opt/telebitd/acme

View File

@ -60,10 +60,6 @@ detect_http_get
## END HTTP_GET ## ## END HTTP_GET ##
############################### ###############################
echo ""
echo ""
echo ""
my_email=${1:-} my_email=${1:-}
my_servername=${2:-} my_servername=${2:-}
my_secret="" my_secret=""
@ -84,7 +80,7 @@ if [ -z "${my_email}" ]; then
read -p "email: " my_email read -p "email: " my_email
echo "" echo ""
# UX - just want a smooth transition # UX - just want a smooth transition
sleep 1 sleep 0.5
fi fi
if [ -z "${my_servername}" ]; then if [ -z "${my_servername}" ]; then
@ -93,9 +89,10 @@ if [ -z "${my_servername}" ]; then
read -p "domain (ex: telebit.example.com): " my_servername read -p "domain (ex: telebit.example.com): " my_servername
echo "" echo ""
# UX - just want a smooth transition # UX - just want a smooth transition
sleep 1 sleep 0.5
fi fi
echo ""
if [ -z "${TELEBITD_PATH:-}" ]; then if [ -z "${TELEBITD_PATH:-}" ]; then
echo 'TELEBITD_PATH="'${TELEBITD_PATH:-}'"' echo 'TELEBITD_PATH="'${TELEBITD_PATH:-}'"'