Skip to content

Commit 36ee197

Browse files
bejjrajeshmjang
andauthored
fix: updating script to track offline installations (#168)
Co-authored-by: Mike Jang <[email protected]>
1 parent 8444d77 commit 36ee197

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

static/scripts/install-nim-bundle.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ install_nim_online(){
530530
exit 1
531531
fi
532532
if [[ -n ${NIM_FQDN} ]] ; then
533-
/etc/nms/scripts/certs.sh ${NIM_FQDN}
533+
bash -c "source /etc/nms/scripts/certs.sh || /etc/nms/scripts/certs.sh 0 ${NIM_FQDN}"
534534
fi
535535
curl -s -o /dev/null --cert ${NGINX_CERT_PATH} --key ${NGINX_CERT_KEY_PATH} "https://pkgs.nginx.com/nms/?using_install_script=true&app=nim&mode=online"
536536
}
@@ -938,6 +938,7 @@ else
938938
cp ${NGINX_CERT_KEY_PATH} "${TEMP_DIR}/${target_distribution}/nginx-repo.key"
939939
tar -zcf "$bundle_file" -C "${TEMP_DIR}/${target_distribution}" .
940940
echo -e "\nSuccessfully created the NGINX Instance Manager bundle - $bundle_file"
941+
curl -s -o /dev/null --cert ${NGINX_CERT_PATH} --key ${NGINX_CERT_KEY_PATH} "https://pkgs.nginx.com/nms/?using_install_script=true&app=nim&mode=offline"
941942

942943
else
943944
echo "Installing NGINX Instance Manager bundle from the path ${INSTALL_PATH}"
@@ -1027,6 +1028,9 @@ else
10271028
echo "Provided install path ${INSTALL_PATH} doesn't exists"
10281029
exit 1
10291030
fi
1030-
curl -s -o /dev/null --cert ${NGINX_CERT_PATH} --key ${NGINX_CERT_KEY_PATH} "https://pkgs.nginx.com/nms/?using_install_script=true&app=nim&mode=online"
1031+
if [[ -n ${NIM_FQDN} ]] ; then
1032+
bash -c "source /etc/nms/scripts/certs.sh || /etc/nms/scripts/certs.sh 0 ${NIM_FQDN}"
1033+
fi
1034+
curl -s -o /dev/null --cert ${NGINX_CERT_PATH} --key ${NGINX_CERT_KEY_PATH} "https://pkgs.nginx.com/nms/?using_install_script=true&app=nim&mode=offline"
10311035
fi
10321036
fi

0 commit comments

Comments
 (0)