From 8ff38b9c60e98dd72f0f973825ea856b5de469bd Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 28 Nov 2022 19:36:26 -0600 Subject: [PATCH] Update install.sh --- install.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 91b2b62..c1dead7 100755 --- a/install.sh +++ b/install.sh @@ -1,12 +1,28 @@ #!/usr/bin/env sh DATA_DIR="/mnt/data" +case "$(ubnt-device-info firmware || true)" in + 1*) + DATA_DIR="/mnt/data" + ;; + 2*) + DATA_DIR="/data" + ;; + 3*) + DATA_DIR="/data" + ;; + *) + echo "ERROR: No persistent storage found." 1>&2 + exit 1 + ;; + esac + echo "Installing UniFiOS-Utilities 'on-boot-script' system..." echo # curl -fsL "https://raw.githubusercontent.com/unifi-utilities/unifios-utilities/HEAD/on-boot-script/remote_install.sh" | /bin/sh echo -echo "${idsCL[Green]}Downloading hostname template file to: ${DATA_DIR}/on_boot.d/dns_custom_hostnames.sh" +echo "Downloading hostname template file to: ${DATA_DIR}/on_boot.d/dns_custom_hostnames.sh" echo echo "Edit the file above to add your custom DNS entires"