From 7cf689b19aad3fecc34c8e294353119e8aaa7867 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 28 Feb 2022 16:49:04 -0500 Subject: [PATCH] Update nginx-proxy-manager-install.sh --- setup/nginx-proxy-manager-install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index 83cd2863..b194c53f 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -102,9 +102,13 @@ echo -en "${GN} Installing Yarn... " npm install --global yarn &>/dev/null echo -e "${CM}${CL} \r" -echo -en "${GN} Downloading NPM v2.9.16... " -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.9.16 -O - | tar -xz &>/dev/null -cd ./nginx-proxy-manager-2.9.16 +RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest \ +| grep "tag_name" \ +| awk '{print substr($2, 3, length($2)-4) }') \ + +echo -en "${GN} Downloading NPM v${RELEASE}... " +wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null +cd ./nginx-proxy-manager-${RELEASE} echo -e "${CM}${CL} \r" echo -en "${GN} Setting up Enviroment... " @@ -113,8 +117,8 @@ ln -sf /usr/bin/certbot /opt/certbot/bin/certbot ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx ln -sf /usr/local/openresty/nginx/ /etc/nginx -sed -i "s+0.0.0+#v2.9.16+g" backend/package.json -sed -i "s+0.0.0+#v2.9.16+g" frontend/package.json +sed -i "s+0.0.0+${RELEASE}+g" backend/package.json +sed -i "s+0.0.0+${RELEASE}+g" frontend/package.json sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf")