From 761e988eb452ce8547ef8719aa5552a210474736 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Tue, 3 Oct 2023 09:37:54 +1100 Subject: [PATCH] tidy up comparators --- install-koji-farm.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/install-koji-farm.sh b/install-koji-farm.sh index c55d463..6839272 100644 --- a/install-koji-farm.sh +++ b/install-koji-farm.sh @@ -30,14 +30,16 @@ fi echo "Checking connectivity..." # install any required packages -if [[ -z $(dnf list installed | grep epel-release) ]] ; then - dnf install -y epel-release $QUIET -fi -if [[ -z $(dnf list installed | grep netcat) ]] ; then - dnf install -y netcat $QUIET +if [[ "$KOJI_WEB_FQDN" != "$KOJI_HUB_FQDN" || "$KOJI_BUILD_FQDNS" ]] ; then + if [[ -z $(dnf list installed | grep epel-release) ]] ; then + dnf install -y epel-release $QUIET + fi + if [[ -z $(dnf list installed | grep netcat) ]] ; then + dnf install -y netcat $QUIET + fi fi -if [[ ! $KOJI_WEB_FQDN = $KOJI_HUB_FQDN ]] ; then +if [[ "$KOJI_WEB_FQDN" != "$KOJI_HUB_FQDN" ]] ; then # check that I can conmnect if [[ -z $(nc -z $KOJI_WEB_FQDN 22 2>&1 | grep succeeded) ]] ; then echo "I cannot connect to the web server at $KOJI_WEB_FQDN! Is it online? " @@ -152,7 +154,7 @@ chmod o+x $SCRIPT_DIR/koji-parameters.sh koji-deploy-hub.sh $DEBUG # deploy the web koji components -if [[ $KOJI_WEB_FQDN = $KOJI_HUB_FQDN ]] ; then +if [[ "$KOJI_WEB_FQDN" == "$KOJI_HUB_FQDN" ]] ; then # deploy locally (default) koji-deploy-web.sh $KOJI_WEB_FQDN $DEBUG else