Add machine specific landingpage container at build time (#949)
The landingpage container is a minimal webserver with built-in zeroconf annoucement. Preinstall the machine specific landingpage container to make sure it will show up right after startup.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
set -e
|
||||
|
||||
ARCH=
|
||||
MACHINE=
|
||||
DATA_IMG="/export/data.ext4"
|
||||
VERSION_URL="https://version.home-assistant.io/stable.json"
|
||||
APPARMOR_URL="https://version.home-assistant.io/apparmor.txt"
|
||||
@@ -14,6 +15,10 @@ while [[ $# -gt 0 ]]; do
|
||||
ARCH=$2
|
||||
shift
|
||||
;;
|
||||
--machine)
|
||||
MACHINE=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
@@ -27,6 +32,7 @@ AUDIO="homeassistant/${ARCH}-hassio-audio"
|
||||
CLI="homeassistant/${ARCH}-hassio-cli"
|
||||
MULTICAST="homeassistant/${ARCH}-hassio-multicast"
|
||||
OBSERVER="homeassistant/${ARCH}-hassio-observer"
|
||||
LANDINGPAGE="homeassistant/${MACHINE}-homeassistant:landingpage"
|
||||
|
||||
SUPERVISOR_VERSION=$(curl -s ${VERSION_URL} | jq -e -r '.supervisor')
|
||||
DNS_VERSION=$(curl -s ${VERSION_URL} | jq -e -r '.dns')
|
||||
@@ -76,6 +82,9 @@ docker pull "${AUDIO}:${AUDIO_VERSION}"
|
||||
docker pull "${MULTICAST}:${MULTICAST_VERSION}"
|
||||
docker pull "${OBSERVER}:${OBSERVER_VERSION}"
|
||||
|
||||
# Install landing page
|
||||
docker pull "${LANDINGPAGE}"
|
||||
|
||||
# Setup AppArmor
|
||||
mkdir -p "/mnt/data/supervisor/apparmor"
|
||||
curl -sL -o "/mnt/data/supervisor/apparmor/hassio-supervisor" "${APPARMOR_URL}"
|
||||
|
||||
Reference in New Issue
Block a user