From 28944a6933e86a61ec3ce00dc9c042997f7e6f25 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 26 May 2018 08:07:49 +0000 Subject: [PATCH] update config --- bin/telebitd.js | 6 +++--- examples/telebitd.yml | 21 ++++++++++++--------- examples/telebitd.yml.tpl | 5 ++++- installer/get.sh | 9 +++------ 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/bin/telebitd.js b/bin/telebitd.js index 81fddb7..99c05b1 100755 --- a/bin/telebitd.js +++ b/bin/telebitd.js @@ -120,15 +120,15 @@ function applyConfig(config) { state.greenlock = Greenlock.create({ - version: 'draft-11' - , server: 'https://acme-v02.api.letsencrypt.org/directory' + version: state.config.greenlock.version || 'draft-11' + , server: state.config.greenlock.server || 'https://acme-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' }) , approveDomains: approveDomains - , configDir: state.config.configDir + , configDir: state.config.greenlock.configDir , debug: true //, approvedDomains: program.servernames diff --git a/examples/telebitd.yml b/examples/telebitd.yml index 79c95ea..239d017 100644 --- a/examples/telebitd.yml +++ b/examples/telebitd.yml @@ -1,12 +1,15 @@ -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 -community_member: true # receive infrequent relevant updates -telemetry: true # contribute to project telemetric data -servernames: # hostnames that direct to the Telebit Relay admin console +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 +community_member: true # receive infrequent relevant updates +telemetry: true # contribute to project telemetric data +servernames: # hostnames that direct to the Telebit Relay admin console - telebit.example.com - 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: - store: 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'))" + version: 'draft-11' + server: 'https://acme-v02.api.letsencrypt.org/directory' + 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'))" diff --git a/examples/telebitd.yml.tpl b/examples/telebitd.yml.tpl index 8f7b18d..bfbd5cb 100644 --- a/examples/telebitd.yml.tpl +++ b/examples/telebitd.yml.tpl @@ -3,5 +3,8 @@ community_member: true telemetry: true vhost: /srv/www/:hostname 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 diff --git a/installer/get.sh b/installer/get.sh index bed6b63..da43d94 100644 --- a/installer/get.sh +++ b/installer/get.sh @@ -60,10 +60,6 @@ detect_http_get ## END HTTP_GET ## ############################### -echo "" -echo "" -echo "" - my_email=${1:-} my_servername=${2:-} my_secret="" @@ -84,7 +80,7 @@ if [ -z "${my_email}" ]; then read -p "email: " my_email echo "" # UX - just want a smooth transition - sleep 1 + sleep 0.5 fi if [ -z "${my_servername}" ]; then @@ -93,9 +89,10 @@ if [ -z "${my_servername}" ]; then read -p "domain (ex: telebit.example.com): " my_servername echo "" # UX - just want a smooth transition - sleep 1 + sleep 0.5 fi +echo "" if [ -z "${TELEBITD_PATH:-}" ]; then echo 'TELEBITD_PATH="'${TELEBITD_PATH:-}'"'