Merge pull request #67 from linuxserver/zip

Switch from deb to zip package
This commit is contained in:
Adam 2024-02-05 19:01:30 +00:00 committed by GitHub
commit 415a778d41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 27 additions and 18 deletions

View file

@ -10,18 +10,17 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="thespad"
# environment settings
ARG UNIFI_BRANCH="stable"
ARG DEBIAN_FRONTEND="noninteractive"
ARG UNIFI_BRANCH="stable" \
DEBIAN_FRONTEND="noninteractive"
RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
binutils \
apt-get install --no-install-recommends -y \
jsvc \
libcap2 \
logrotate \
openjdk-17-jre-headless && \
openjdk-17-jre-headless \
unzip && \
echo "**** install unifi ****" && \
if [ -z ${UNIFI_VERSION+x} ]; then \
UNIFI_VERSION=$(curl -sX GET http://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
@ -31,9 +30,10 @@ RUN \
fi && \
mkdir -p /app && \
curl -o \
/tmp/unifi.deb -L \
"https://dl.ui.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" && \
dpkg -i --ignore-depends=mongodb-org-server /tmp/unifi.deb && \
/tmp/unifi.zip -L \
"https://dl.ui.com/unifi/${UNIFI_VERSION}/UniFi.unix.zip" && \
unzip /tmp/unifi.zip -d /usr/lib && \
mv /usr/lib/UniFi /usr/lib/unifi && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \

View file

@ -10,18 +10,17 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="thespad"
# environment settings
ARG UNIFI_BRANCH="stable"
ARG DEBIAN_FRONTEND="noninteractive"
ARG UNIFI_BRANCH="stable" \
DEBIAN_FRONTEND="noninteractive"
RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
binutils \
apt-get install --no-install-recommends -y \
jsvc \
libcap2 \
logrotate \
openjdk-17-jre-headless && \
openjdk-17-jre-headless \
unzip && \
echo "**** install unifi ****" && \
if [ -z ${UNIFI_VERSION+x} ]; then \
UNIFI_VERSION=$(curl -sX GET http://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
@ -31,9 +30,10 @@ RUN \
fi && \
mkdir -p /app && \
curl -o \
/tmp/unifi.deb -L \
"https://dl.ui.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" && \
dpkg -i --ignore-depends=mongodb-org-server /tmp/unifi.deb && \
/tmp/unifi.zip -L \
"https://dl.ui.com/unifi/${UNIFI_VERSION}/UniFi.unix.zip" && \
unzip /tmp/unifi.zip -d /usr/lib && \
mv /usr/lib/UniFi /usr/lib/unifi && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \

View file

@ -123,5 +123,6 @@ app_setup_block: |
# changelog
changelogs:
- { date: "04.03.24:", desc: "Install from zip package instead of deb." }
- { date: "17.10.23:", desc: "Add environment variables for TLS and authSource to support Atlas and new MongoDB versions." }
- { date: "05.09.23:", desc: "Initial release." }

View file

@ -3,6 +3,7 @@
# create our folders
mkdir -p \
/run/unifi/work/ROOT \
/config/{data,logs}
# create symlinks for config
@ -19,6 +20,13 @@ for i in "${symlinks[@]}"; do
fi
done
if [[ -L "/usr/lib/unifi/run" && ! "/usr/lib/unifi/run" -ef "/run/unifi" ]]; then
unlink "/usr/lib/unifi/run"
fi
if [[ ! -L "/usr/lib/unifi/run" ]]; then
ln -s "/run/unifi" "/usr/lib/unifi/run"
fi
if [[ ! -e /config/data/system.properties ]]; then
if [[ -z "${MONGO_HOST}" ]]; then
echo "*** No MONGO_HOST set, cannot configure database settings. ***"