diff --git a/ct/apache-tika.sh b/ct/apache-tika.sh index 4d731da8e..9b6daf3c2 100755 --- a/ct/apache-tika.sh +++ b/ct/apache-tika.sh @@ -35,11 +35,8 @@ function update_script() { msg_ok "Stopped Service" msg_info "Updating ${APP} to v${RELEASE}" - cd /opt/apache-tika - curl -fsSL -o tika-server-standard-${RELEASE}.jar "https://dlcdn.apache.org/tika/${RELEASE}/tika-server-standard-${RELEASE}.jar" - mv --force tika-server-standard.jar tika-server-standard-prev-version.jar - mv tika-server-standard-${RELEASE}.jar tika-server-standard.jar - rm -rf /opt/apache-tika/tika-server-standard-prev-version.jar + CLEAN_INSTALL=1 fetch_and_deploy_from_url "https://dlcdn.apache.org/tika/${RELEASE}/tika-server-standard-${RELEASE}.zip" /opt/apache-tika + mv "/opt/apache-tika/tika-server-standard-${RELEASE}.jar" /opt/apache-tika/tika-server-standard.jar echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to v${RELEASE}" diff --git a/install/apache-tika-install.sh b/install/apache-tika-install.sh index 5c277e2bf..9577eb6a9 100644 --- a/install/apache-tika-install.sh +++ b/install/apache-tika-install.sh @@ -35,11 +35,9 @@ msg_ok "Installed Dependencies" JAVA_VERSION="21" setup_java msg_info "Installing Apache Tika" -mkdir -p /opt/apache-tika -cd /opt/apache-tika RELEASE="$(curl -fsSL https://dlcdn.apache.org/tika/ | grep -oP '(?<=href=")[0-9]+\.[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1)" -curl -fsSL "https://dlcdn.apache.org/tika/${RELEASE}/tika-server-standard-${RELEASE}.jar" -o tika-server-standard-${RELEASE}.jar -mv tika-server-standard-${RELEASE}.jar tika-server-standard.jar +fetch_and_deploy_from_url "https://dlcdn.apache.org/tika/${RELEASE}/tika-server-standard-${RELEASE}.zip" /opt/apache-tika +mv "/opt/apache-tika/tika-server-standard-${RELEASE}.jar" /opt/apache-tika/tika-server-standard.jar echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Apache Tika"