Skip to content

Instantly share code, notes, and snippets.

@AlexxIT
Created August 19, 2019 10:34
Show Gist options
  • Save AlexxIT/56af8c560780c20d48916c63846dc251 to your computer and use it in GitHub Desktop.
Save AlexxIT/56af8c560780c20d48916c63846dc251 to your computer and use it in GitHub Desktop.
#!/bin/bash
name="hassio"
path="/home/alexey/hassio"
if [[ $1 == "stop" ]]; then
docker stop $name && docker rm $name
elif [[ $1 == "log" ]]; then
docker logs --tail=100 -f $name
else
docker run -d \
--name $name \
--privileged \
--restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run/dbus:/var/run/dbus \
-v $path:/data \
-e SUPERVISOR_SHARE=$path \
-e SUPERVISOR_NAME=$name \
-e HOMEASSISTANT_REPOSITORY=homeassistant/qemux86-64-homeassistant \
homeassistant/amd64-hassio-supervisor
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment