Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beta UniFi Network Application 7.5.169 #325

Open
wants to merge 4 commits into
base: tong2x-Beta-Firmwares7.4.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions install-unifi/install-unifi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Installs the Uni-Fi controller software on a FreeBSD machine (presumably running pfSense).

# The latest version of UniFi:
UNIFI_SOFTWARE_URL="https://dl.ui.com/unifi/7.4.162-3116043f9f/UniFi.unix.zip"
UNIFI_SOFTWARE_URL="https://dl.ui.com/unifi/7.5.169-2ec9b4cd24/UniFi.unix.zip"

# The rc script associated with this branch or fork:
RC_SCRIPT_URL="https://raw.githubusercontent.com/unofficial-unifi/unifi-pfsense/master/rc.d/unifi.sh"
Expand All @@ -13,6 +13,14 @@ RC_SCRIPT_URL="https://raw.githubusercontent.com/unofficial-unifi/unifi-pfsense/
# As UniFi adds support for new mongodb versions, just prepend them to this list
SUPPORTED_MONGODB_PACKAGES="mongodb44 mongodb42 mongodb40 mongodb36 mongodb34 mongodb32 mongodb"

CURRENT_MONGODB_VERSION=mongodb44
MONGO_NEEDS_FALLBACK_VERSION="2.7."
MONGO_NEEDS_SSL="/usr/lib/libssl.so.30"
if [ $(pkg config abi | grep -c "FreeBSD:14:") -eq 1 ] && [ $(grep -c $MONGO_NEEDS_FALLBACK_VERSION /etc/version) -eq 1 ] && [ ! -f $MONGO_NEEDS_SSL ]; then
FALLBACK_MONGO_ABI="FreeBSD:13:$(pkg config abi | awk -F ':' '{print $3}')"
FALLBACK_MONGO_PACKAGE_URL="https://pkg.freebsd.org/${FALLBACK_MONGO_ABI}/latest/"
fi

# If pkg-ng is not yet installed, bootstrap it:
if ! /usr/sbin/pkg -N 2> /dev/null; then
echo "FreeBSD pkgng not installed. Installing..."
Expand Down Expand Up @@ -125,10 +133,12 @@ echo "Installing required packages..."

AddPkg () {
pkgname=$1
base_url=${2:-$FREEBSD_PACKAGE_URL}
pkg unlock -yq $pkgname
pkginfo=`grep "\"name\":\"$pkgname\"" packagesite.yaml`
pkgvers=`echo $pkginfo | pcregrep -o1 '"version":"(.*?)"' | head -1`
pkgurl="${FREEBSD_PACKAGE_URL}`echo $pkginfo | pcregrep -o1 '"path":"(.*?)"' | head -1`"
#pkgurl="${FREEBSD_PACKAGE_URL}`echo $pkginfo | pcregrep -o1 '"path":"(.*?)"' | head -1`"
pkgurl="${base_url}`echo $pkginfo | pcregrep -o1 '"path":"(.*?)"' | head -1`"

# compare version for update/install
if [ `pkg info | grep -c $pkgname-$pkgvers` -eq 1 ]; then
Expand Down Expand Up @@ -188,15 +198,20 @@ AddPkg font-misc-ethiopic
AddPkg font-misc-meltho
AddPkg xorg-fonts-truetype
AddPkg openjdk11
AddPkg graphite2
AddPkg harfbuzz
AddPkg openjdk17
AddPkg snappy
AddPkg cyrus-sasl
AddPkg icu
AddPkg boost-libs
AddPkg libunwind
AddPkg snowballstemmer
AddPkg yaml-cpp
if [ ! -z "$CURRENT_MONGODB_VERSION" ]; then
AddPkg ${CURRENT_MONGODB_VERSION}
if [ -n "$FALLBACK_MONGO_PACKAGE_URL" ]; then
AddPkg ${CURRENT_MONGODB_VERSION} ${FALLBACK_MONGO_PACKAGE_URL}
else
AddPkg ${CURRENT_MONGODB_VERSION}
fi
AddPkg unzip
AddPkg pcre
Expand Down