Skip to content

Commit 415a778

Browse files
authored
Merge pull request #67 from linuxserver/zip
Switch from deb to zip package
2 parents 8987376 + 7e4ee7d commit 415a778

File tree

4 files changed

+27
-18
lines changed

4 files changed

+27
-18
lines changed

Dockerfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
1010
LABEL maintainer="thespad"
1111

1212
# environment settings
13-
ARG UNIFI_BRANCH="stable"
14-
ARG DEBIAN_FRONTEND="noninteractive"
13+
ARG UNIFI_BRANCH="stable" \
14+
DEBIAN_FRONTEND="noninteractive"
1515

1616
RUN \
1717
echo "**** install packages ****" && \
1818
apt-get update && \
19-
apt-get install -y --no-install-recommends \
20-
binutils \
19+
apt-get install --no-install-recommends -y \
2120
jsvc \
22-
libcap2 \
2321
logrotate \
24-
openjdk-17-jre-headless && \
22+
openjdk-17-jre-headless \
23+
unzip && \
2524
echo "**** install unifi ****" && \
2625
if [ -z ${UNIFI_VERSION+x} ]; then \
2726
UNIFI_VERSION=$(curl -sX GET http://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
@@ -31,9 +30,10 @@ RUN \
3130
fi && \
3231
mkdir -p /app && \
3332
curl -o \
34-
/tmp/unifi.deb -L \
35-
"https://dl.ui.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" && \
36-
dpkg -i --ignore-depends=mongodb-org-server /tmp/unifi.deb && \
33+
/tmp/unifi.zip -L \
34+
"https://dl.ui.com/unifi/${UNIFI_VERSION}/UniFi.unix.zip" && \
35+
unzip /tmp/unifi.zip -d /usr/lib && \
36+
mv /usr/lib/UniFi /usr/lib/unifi && \
3737
echo "**** cleanup ****" && \
3838
apt-get clean && \
3939
rm -rf \

Dockerfile.aarch64

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
1010
LABEL maintainer="thespad"
1111

1212
# environment settings
13-
ARG UNIFI_BRANCH="stable"
14-
ARG DEBIAN_FRONTEND="noninteractive"
13+
ARG UNIFI_BRANCH="stable" \
14+
DEBIAN_FRONTEND="noninteractive"
1515

1616
RUN \
1717
echo "**** install packages ****" && \
1818
apt-get update && \
19-
apt-get install -y --no-install-recommends \
20-
binutils \
19+
apt-get install --no-install-recommends -y \
2120
jsvc \
22-
libcap2 \
2321
logrotate \
24-
openjdk-17-jre-headless && \
22+
openjdk-17-jre-headless \
23+
unzip && \
2524
echo "**** install unifi ****" && \
2625
if [ -z ${UNIFI_VERSION+x} ]; then \
2726
UNIFI_VERSION=$(curl -sX GET http://dl.ui.com/unifi/debian/dists/${UNIFI_BRANCH}/ubiquiti/binary-amd64/Packages \
@@ -31,9 +30,10 @@ RUN \
3130
fi && \
3231
mkdir -p /app && \
3332
curl -o \
34-
/tmp/unifi.deb -L \
35-
"https://dl.ui.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" && \
36-
dpkg -i --ignore-depends=mongodb-org-server /tmp/unifi.deb && \
33+
/tmp/unifi.zip -L \
34+
"https://dl.ui.com/unifi/${UNIFI_VERSION}/UniFi.unix.zip" && \
35+
unzip /tmp/unifi.zip -d /usr/lib && \
36+
mv /usr/lib/UniFi /usr/lib/unifi && \
3737
echo "**** cleanup ****" && \
3838
apt-get clean && \
3939
rm -rf \

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,6 @@ app_setup_block: |
123123
124124
# changelog
125125
changelogs:
126+
- { date: "04.03.24:", desc: "Install from zip package instead of deb." }
126127
- { date: "17.10.23:", desc: "Add environment variables for TLS and authSource to support Atlas and new MongoDB versions." }
127128
- { date: "05.09.23:", desc: "Initial release." }

root/etc/s6-overlay/s6-rc.d/init-unifi-network-application-config/run

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# create our folders
55
mkdir -p \
6+
/run/unifi/work/ROOT \
67
/config/{data,logs}
78

89
# create symlinks for config
@@ -19,6 +20,13 @@ for i in "${symlinks[@]}"; do
1920
fi
2021
done
2122

23+
if [[ -L "/usr/lib/unifi/run" && ! "/usr/lib/unifi/run" -ef "/run/unifi" ]]; then
24+
unlink "/usr/lib/unifi/run"
25+
fi
26+
if [[ ! -L "/usr/lib/unifi/run" ]]; then
27+
ln -s "/run/unifi" "/usr/lib/unifi/run"
28+
fi
29+
2230
if [[ ! -e /config/data/system.properties ]]; then
2331
if [[ -z "${MONGO_HOST}" ]]; then
2432
echo "*** No MONGO_HOST set, cannot configure database settings. ***"

0 commit comments

Comments
 (0)