From bfa4cd815e6af95f1a81421ef1be0eab5b58dccb Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 5 Feb 2024 18:10:55 -0500 Subject: [PATCH] Update nginxproxymanager-install.sh option to install v2.10.4 --- install/nginxproxymanager-install.sh | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 52ee0e70..5f690584 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -68,22 +68,32 @@ RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-man grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -msg_info "Downloading Nginx Proxy Manager v${RELEASE}" -wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz -cd ./nginx-proxy-manager-${RELEASE} -msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" - +read -r -p "Would you like to install an older version (v2.20.4)? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Downloading Nginx Proxy Manager v2.10.4" + wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v2.10.4 -O - | tar -xz + cd ./nginx-proxy-manager-2.10.4 + msg_ok "Downloaded Nginx Proxy Manager v2.10.4" +else + msg_info "Downloading Nginx Proxy Manager v${RELEASE}" + wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz + cd ./nginx-proxy-manager-${RELEASE} + msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}" +fi msg_info "Setting up Enviroment" ln -sf /usr/bin/python3 /usr/bin/python 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|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json -sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + sed -i "s|\"version\": \"0.0.0\"|\"version\": \"2.10.4\"|" backend/package.json + sed -i "s|\"version\": \"0.0.0\"|\"version\": \"2.10.4\"|" frontend/package.json +else + sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json + sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json +fi sed -i 's|"fork-me": ".*"|"fork-me": "Proxmox VE Helper-Scripts"|' frontend/js/i18n/messages.json sed -i "s|https://github.com.*source=nginx-proxy-manager|https://helper-scripts.com|g" frontend/js/app/ui/footer/main.ejs - sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf") for NGINX_CONF in $NGINX_CONFS; do