From 56196d65f0b43aa9a22520c48586980ec9e4405b Mon Sep 17 00:00:00 2001 From: Ernesto Serrano Date: Mon, 26 Mar 2018 09:47:40 +0200 Subject: [PATCH] Fix scripts --- algo | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/algo b/algo index c0c06584..14ace95c 100755 --- a/algo +++ b/algo @@ -519,10 +519,6 @@ if [ "x${IP_subject}" = "x" ]; then exit 1 fi - ROLES="local vpn" - EXTRA_VARS="server_ip=$server_ip server_user=$server_user IP_subject_alt_name=$IP_subject" - SKIP_TAGS+=" cloud update-alternatives" - read -p " Enter the public DNS name of your server: (IMPORTANT! This name is used to verify the certificate) @@ -534,8 +530,13 @@ if [ "x${DNS_subject}" = "x" ]; then exit 1 fi + ROLES="local vpn" + EXTRA_VARS="server_ip=$server_ip server_user=$server_user DNS_subject_alt_name=$DNS_subject IP_subject_alt_name=$IP_subject" + SKIP_TAGS+=" cloud update-alternatives" + read -p " + Was this server deployed by Algo previously? [y/N]: " -r Deployed_By_Algo Deployed_By_Algo=${Deployed_By_Algo:-n} @@ -610,6 +611,17 @@ exit 1 fi read -p " + +Enter the public DNS name of your server: (IMPORTANT! This name is used to verify the certificate) +[$mydns]: " -r DNS_subject + DNS_subject=${DNS_subject:-$mydns} + +if [ "x${DNS_subject}" = "x" ]; then + echo "no public DNS name given. exiting." + exit 1 +fi + + read -p " Enter the password for the private CA key: $ADDITIONAL_PROMPT : " -rs easyrsa_CA_password