From 9ae614385701b26d68124a2a9a5ac601c4383b90 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 4 Jun 2018 23:43:11 +0000 Subject: [PATCH] add missing 'relay' config --- usr/share/install_helper.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/usr/share/install_helper.sh b/usr/share/install_helper.sh index e1ef764..65f7963 100644 --- a/usr/share/install_helper.sh +++ b/usr/share/install_helper.sh @@ -61,9 +61,11 @@ if [ -z "${my_email}" ]; then fi if [ -z "${my_relay}" ]; then - echo "What relay will you be using? (press enter for default)" + echo "What self-hosted relay will you be using?" + #echo "What relay will you be using? (press enter for default)" echo "" - read -p "relay [default: wss://www.telebit.cloud]: " my_relay + #read -p "relay [default: wss://www.telebit.cloud]: " my_relay + read -p "relay:" my_relay echo "" my_relay=${2:-wss://www.telebit.cloud} # UX - just want a smooth transition @@ -71,18 +73,22 @@ if [ -z "${my_relay}" ]; then fi if [ -z "${my_servernames}" ]; then - echo "What servername(s) will you be relaying here? (press enter for default)" + #echo "What servername(s) will you be relaying here? (press enter for default)" + echo "What servername(s) will you be relaying here?" echo "" - read -p "domain [default: .telebit.cloud]: " my_servernames + #read -p "domain [default: .telebit.cloud]: " my_servernames + read -p "domain: " my_servernames echo "" # UX - just want a smooth transition sleep 0.5 fi if [ -z "${my_secret}" ]; then - echo "What's your authorization for the relay server? (press enter for default)" + #echo "What's your authorization for the relay server? (press enter for default)" + echo "What's your authorization for the relay server?" echo "" - read -p "auth [default: new account]: " my_secret + #read -p "auth [default: new account]: " my_secret + read -p "secret: " my_secret echo "" # UX - just want a smooth transition sleep 0.5 @@ -196,6 +202,9 @@ mkdir -p "$(dirname $my_config)" if [ ! -e "$my_config" ]; then #$rsync_cmd examples/$my_app.yml "$my_config" echo "email: $my_email" >> "$my_config" + if [ -n "$my_relay" ]; then + echo "relay: $my_relay" >> "$my_config" + fi if [ -n "$my_secret" ]; then echo "secret: $my_secret" >> "$my_config" fi @@ -211,6 +220,9 @@ mkdir -p "$(dirname $my_config)" if [ ! -e "$my_config" ]; then echo "cli: true" >> "$my_config" echo "email: $my_email" >> "$my_config" + if [ -n "$my_relay" ]; then + echo "relay: $my_relay" >> "$my_config" + fi if [ -n "$my_secret" ]; then echo "secret: $my_secret" >> "$my_config" fi @@ -320,4 +332,4 @@ else fi echo "" -sleep 1 +sleep 1 \ No newline at end of file