From d404df554a5b73fd2fd693cc15e6482341ffed80 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Thu, 14 Sep 2023 17:53:49 +1000 Subject: [PATCH] fix sed statements --- install-koji-farm.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/install-koji-farm.sh b/install-koji-farm.sh index c0deda9..c293df4 100644 --- a/install-koji-farm.sh +++ b/install-koji-farm.sh @@ -142,8 +142,18 @@ else exit 1 fi # update hub config files to point at web server - sed 's,KojiWebURL.*,KojiWebURL = http://$KOJI_WEB_FQDN/koji,g' /etc/koji-hub/hub.conf - sed 's,weburl.*,weburl = http://$KOJI_WEB_FQDN/koji,g' /etc/koji.conf + sed -i 's,KojiWebURL.*,KojiWebURL = http://$KOJI_WEB_FQDN/koji,g' /etc/koji-hub/hub.conf + sed -i 's,weburl.*,weburl = http://$KOJI_WEB_FQDN/koji,g' /etc/koji.conf + # check if nfs has been installed on the hub (only need to install once) + if [[ -z $(dnf list installed | grep nfs-server) ]] ; then + # add nfs share for koji files direcory to hub + curl $SILENT $SCRIPT_GIT/koji-deploy-nfs-server.sh > $SCRIPT_DIR/koji-deploy-nfs-server.sh + chmod o+x $SCRIPT_DIR/koji-deploy-nfs-server.sh + koji-deploy-nfs-server.sh $DEBUG + fi + + # add web server to nfs exports line for /mnt/koji + sed -i '/^\/mnt\/koji/ s/$/ $KOJI_WEB_FQDN(ro,no_root_squash)/g' /etc/exports # generate a hub ssh key if there isn't one already (for scp & ssh to web server) if [ ! -f /root/.ssh/id-rsa ] ; then # create a ssh key on build server