mirror of
https://src.koozali.org/infra/smeserver-koji.git
synced 2024-12-22 15:37:00 +01:00
add connection testing early in install script
This commit is contained in:
parent
c48b42b5f2
commit
1dd0bf5f77
@ -32,6 +32,7 @@ fi
|
||||
SCRIPT_GIT="https://src.koozali.org/smedev/smeserver-koji/raw/branch/master/koji-setup"
|
||||
SCRIPT_DIR="$(echo ~)/bin"
|
||||
|
||||
echo "Loading required scripts and packages...." ; fi
|
||||
mkdir -p $SCRIPT_DIR
|
||||
curl $SILENT $SCRIPT_GIT/koji-deploy-hub.sh > $SCRIPT_DIR/koji-deploy-hub.sh
|
||||
curl $SILENT $SCRIPT_GIT/koji-deploy-web.sh > $SCRIPT_DIR/koji-deploy-web.sh
|
||||
@ -48,6 +49,27 @@ if [[ -z $(dnf list installed | grep netcat) ]] ; then
|
||||
dnf install -y netcat $QUIET
|
||||
fi
|
||||
|
||||
if [[ ! $KOJI_WEB_FQDN = $KOJI_HUB_FQDN ]] ; then
|
||||
# check that I can conmnect
|
||||
if [ ! nc -z $KOJI_WEB_FQDN 22 2>/dev/null ] ; then
|
||||
echo "I cannot connect to the web server at $KOJI_WEB_FQDN! Is it online? "
|
||||
echo "Options:"
|
||||
echo "- turn on the server"
|
||||
echo "- add this server into the /etc/hosts file on this server"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
for FQDN in ${KOJI_BUILD_FQDNS} ; do
|
||||
# check that I can conmnect
|
||||
if [ ! nc -z $FQDN 22 2>/dev/null ] ; then
|
||||
echo "I cannot connect to builder at $FQDN! Is it online? "
|
||||
echo "Options:"
|
||||
echo "- turn on the server"
|
||||
echo "- add this server into the /etc/hosts file on this server"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# ask for required parameters (ssh settings and build server FQDN)
|
||||
echo "Please enter the following details for generating your SSL keys"
|
||||
while true ; do
|
||||
|
Loading…
Reference in New Issue
Block a user