Init install script
This commit is contained in:
parent
0cbdef92b7
commit
d3ff3f35aa
2 changed files with 75 additions and 0 deletions
18
install/README.md
Normal file
18
install/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Install HassIO
|
||||
|
||||
That is only if you want run HassIO on a generic system without our yocto images.
|
||||
|
||||
## Run
|
||||
|
||||
Run as root:
|
||||
```bash
|
||||
curl -sL | bash -
|
||||
```
|
||||
|
||||
On a special platform they need set a machine type use:
|
||||
```bash
|
||||
curl -sL | bash - -m MY_MACHINE
|
||||
```
|
||||
|
||||
## HomeAssistant docker images
|
||||
On a i386 or amd64 it will use automatic the generic image for that platform. You can also use a specific docker image for that platform.
|
57
install/hassio_install
Normal file
57
install/hassio_install
Normal file
|
@ -0,0 +1,57 @@
|
|||
#!/bin/bash
|
||||
|
||||
ARCH=$(uname -m)
|
||||
DOCKER_REPO=pvizeli
|
||||
|
||||
# Parse command line parameters
|
||||
while [[ $# > 0 ]]; do
|
||||
arg="$1"
|
||||
|
||||
case $arg in
|
||||
-m|--machine)
|
||||
if [ -z "$2" ]; then
|
||||
echo "[ERROR] \"$1\" argument needs a value"
|
||||
fi
|
||||
MACHINE=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "[ERROR] Unrecognized option $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Generate hardware options
|
||||
case $ARCH in
|
||||
"i386" | "i686")
|
||||
MACHINE=${MACHINE:=qemux86}
|
||||
HOMEASSISTANT_DOCKER="$DOCKER_REPO/$MACHINE-homeassistant"
|
||||
HASSIO_DOCKER="$DOCKER_REPO/i386-hassio-supervisor"
|
||||
;;
|
||||
"x86_64")
|
||||
MACHINE=${MACHINE:=qemux86-64}
|
||||
HOMEASSISTANT_DOCKER="$DOCKER_REPO/$MACHINE-homeassistant"
|
||||
HASSIO_DOCKER="$DOCKER_REPO/amd64-hassio-supervisor"
|
||||
;;
|
||||
"arm" | "armv7l")
|
||||
if [ -z $MACHINE ]; then
|
||||
echo "[ERROR] Please set machine for $ARCH"
|
||||
exit 1
|
||||
fi
|
||||
HOMEASSISTANT_DOCKER="$DOCKER_REPO/$MACHINE-homeassistant"
|
||||
HASSIO_DOCKER="$DOCKER_REPO/armhf-hassio-supervisor"
|
||||
;;
|
||||
"aarch64")
|
||||
if [ -z $MACHINE ]; then
|
||||
echo "[ERROR] Please set machine for $ARCH"
|
||||
exit 1
|
||||
fi
|
||||
HOMEASSISTANT_DOCKER="$DOCKER_REPO/$MACHINE-homeassistant"
|
||||
HASSIO_DOCKER="$DOCKER_REPO/aarch64-hassio-supervisor"
|
||||
;;
|
||||
*)
|
||||
echo "[ERROR] $ARCH unknown!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue