diff --git a/build/package.sh b/build/package.sh index f42fd56..203ed0b 100755 --- a/build/package.sh +++ b/build/package.sh @@ -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 \ No newline at end of file +# 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 \ No newline at end of file diff --git a/install.sh b/install.sh index 10a01e3..c4e0917 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/package/manage.sh b/package/manage.sh index 867ee72..be16fb8 100755 --- a/package/manage.sh +++ b/package/manage.sh @@ -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