32 lines
928 B
Bash
Executable File
32 lines
928 B
Bash
Executable File
#!/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
|
|
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 "Downloading hostname template file to: ${DATA_DIR}/on_boot.d/dns_custom_hostnames.sh"
|
|
curl -fskL https://git.schroedercity.com/voltron/udm_customdns/raw/branch/main/dns_custom_hostnames.sh -o ${DATA_DIR}/on_boot.d/dns_custom_hostnames.sh
|
|
echo
|
|
echo "Edit the file above to add your custom DNS entires"
|
|
echo
|
|
echo "Run the following command after making changes: ${DATA_DIR}/on_boot.d/dns_custom_hostnames.sh"
|
|
echo
|