mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-17 22:25:02 +00:00
tools.func: replace max-time with speed-limit stall detection in curl_download (#14545)
* tools.func: replace max-time with speed-limit stall detection in curl_download * Refactor curl_download function for improved readability and remove unnecessary whitespace
This commit is contained in:
committed by
GitHub
parent
8f1c4a27a6
commit
f7a69ac92d
@@ -66,7 +66,7 @@ esac
|
||||
msg_info "Installing Tomcat $TOMCAT_VERSION"
|
||||
LATEST_VERSION=$(curl -fsSL "https://dlcdn.apache.org/tomcat/tomcat-$TOMCAT_VERSION/" | grep -oP 'v[0-9]+\.[0-9]+\.[0-9]+(-M[0-9]+)?/' | sort -V | tail -n 1 | sed 's/\/$//; s/v//')
|
||||
TOMCAT_URL="https://dlcdn.apache.org/tomcat/tomcat-$TOMCAT_VERSION/v$LATEST_VERSION/bin/apache-tomcat-$LATEST_VERSION.tar.gz"
|
||||
curl -fsSL "$TOMCAT_URL" -o "/tmp/tomcat.tar.gz"
|
||||
curl_download "/tmp/tomcat.tar.gz" "$TOMCAT_URL"
|
||||
mkdir -p /opt/tomcat-$TOMCAT_VERSION
|
||||
tar --strip-components=1 -xzf /tmp/tomcat.tar.gz -C /opt/tomcat-$TOMCAT_VERSION
|
||||
chown -R root:root /opt/tomcat-$TOMCAT_VERSION
|
||||
|
||||
Reference in New Issue
Block a user