Created
August 19, 2019 10:34
-
-
Save AlexxIT/56af8c560780c20d48916c63846dc251 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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