Browse Source

fix(configure): add check for valid FQDN

pull/1541/head
Harry Vasanth 2 years ago committed by Christopher Fremond
parent
commit
43129a46ca
  1. 25
      sh/debian/configure.sh

25
sh/debian/configure.sh diff.vendored

@ -219,6 +219,22 @@ function checkList() {
echo " SSH private/public key pair generated" echo " SSH private/public key pair generated"
} }
function runHTTPS() {
echo -e "Deploying HTTPS service: \n"
echo "Enter the server FQDN $(tput setaf 2)[System: $(hostname)]$(tput sgr0):"
read httpsFQDN
# Check if the FQDN is valid
if ping -c1 -W1 $httpsFQDN 2>/dev/null; then
cd /root/core/https
DOMAIN=$httpsFQDN ./run.sh
echo -e "HTTPS service is up! \n"
else
echo "$(tput setaf 1)$(tput bold)The FQDN: $httpsFQDN is not reachable$(tput sgr0)"
echo "$(tput setaf 1)Please check your DNS configuration$(tput sgr0)"
runHTTPS
fi
}
# Deploy core repositories # Deploy core repositories
function deployCore() { function deployCore() {
# Check for the presence of configurations # Check for the presence of configurations
@ -237,12 +253,7 @@ function deployCore() {
docker login docker.01-edu.org -u $dockerUsername -p $dockerPassword docker login docker.01-edu.org -u $dockerUsername -p $dockerPassword
# Deploy HTTPS # Deploy HTTPS
echo -e "Deploying HTTPS service: \n" runHTTPS
echo "Enter the server FQDN $(tput setaf 2)[System: $(hostname)]$(tput sgr0):"
read httpsFQDN
cd /root/core/https
DOMAIN=$httpsFQDN ./run.sh
echo -e "HTTPS service is up! \n"
# Deploy Runner # Deploy Runner
echo -e "Deploying Runner service: \n " echo -e "Deploying Runner service: \n "
@ -265,7 +276,7 @@ function deployPlatform() {
cd /root/$serverFQDN cd /root/$serverFQDN
# Generate platform environment file automatically # Generate platform environment file automatically
./generate_env.sh --auto ./generate_env.sh --auto
docker-compose --build --detach docker-compose up --build --detach
./redeploy.sh --latest ./redeploy.sh --latest
} }

Loading…
Cancel
Save