Skip to content

Commit

Permalink
Merge pull request #63 from movementgyms/main
Browse files Browse the repository at this point in the history
Add check for UniFi CloudKey Gen2
  • Loading branch information
notheotherben authored Jul 1, 2023
2 parents c126c3a + 10816cc commit 4663938
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
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

0 comments on commit 4663938

Please sign in to comment.