22 lines
519 B
Bash
22 lines
519 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
LOG4J_URL=https://downloads.apache.org/logging/log4j/2.17.1/apache-log4j-2.17.1-bin.tar.gz
|
|
|
|
TMPDIR=$(mktemp -d)
|
|
ORIGDIR=$(pwd)
|
|
|
|
cd "${TMPDIR}" || exit 1
|
|
|
|
curl -L -o "${TMPDIR}/log4j.tar.gz" "${LOG4J_URL}"
|
|
|
|
tar --strip=1 -xf log4j.tar.gz
|
|
|
|
mv log4j-api-2.17.1.jar /usr/lib/unifi/lib/log4j-api-2.12.1.jar
|
|
mv log4j-core-2.17.1.jar /usr/lib/unifi/lib/log4j-core-2.12.1.jar
|
|
mv log4j-slf4j-impl-2.17.1.jar /usr/lib/unifi/lib/log4j-slf4j-impl-2.12.1.jar
|
|
|
|
cd "${ORIGDIR}" || exit
|
|
|
|
rm -rf "${TMPDIR}"
|