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

Add check for UniFi CloudKey Gen2 #63

Merged
merged 2 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion build/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ cp "${SOURCE}/LICENSE" "${WORKDIR}/tailscale/LICENSE"

echo "Building tailscale-udm package"
mkdir -p "${DEST}"
tar czf "${DEST}/tailscale-udm.tgz" -C "${WORKDIR}" tailscale on_boot.d --owner=0 --group=0
# Assuming GNU tar with the --owner and --group args
gtar czf "${DEST}/tailscale-udm.tgz" -C "${WORKDIR}" tailscale on_boot.d --owner=0 --group=0
5 changes: 5 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ elif [ -f "/usr/lib/version" ]; then
# example /usr/lib/version file contents:
# UCKP.apq8053.v2.5.11.b2ebfc7.220801.1419
# UCKP.apq8053.v3.0.17.8102bbc.230210.1526
# UCKG2 == UniFi CloudKey Gen2
# example /usr/lib/version file contents:
# UCKG2.apq8053.v3.1.13.3584673.230626.2239
if [ "$(grep -c '^UCKP.*\.v[0-9]\.' /usr/lib/version)" = '1' ]; then
OS_VERSION="$(sed -e 's/UCKP.*.v\(.\)\..*/\1/' /usr/lib/version)"
elif [ "$(grep -c '^UCKG2.*\.v[0-9]\.' /usr/lib/version)" = '1' ]; then
OS_VERSION="$(sed -e 's/UCKG2.*.v\(.\)\..*/\1/' /usr/lib/version)"
else
echo "Could not detect OS Version. /usr/lib/version contains:"
cat /usr/lib/version
Expand Down
5 changes: 5 additions & 0 deletions package/manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ elif [ -f "/usr/lib/version" ]; then
# example /usr/lib/version file contents:
# UCKP.apq8053.v2.5.11.b2ebfc7.220801.1419
# UCKP.apq8053.v3.0.17.8102bbc.230210.1526
# UCKG2 == UniFi CloudKey Gen2
# example /usr/lib/version file contents:
# UCKG2.apq8053.v3.1.13.3584673.230626.2239
if [ "$(grep -c '^UCKP.*\.v[0-9]\.' /usr/lib/version)" = '1' ]; then
OS_VERSION="$(sed -e 's/UCKP.*.v\(.\)\..*/\1/' /usr/lib/version)"
elif [ "$(grep -c '^UCKG2.*\.v[0-9]\.' /usr/lib/version)" = '1' ]; then
OS_VERSION="$(sed -e 's/UCKG2.*.v\(.\)\..*/\1/' /usr/lib/version)"
else
echo "Could not detect OS Version. /usr/lib/version contains:"
cat /usr/lib/version
Expand Down