31 lines
577 B
Bash
31 lines
577 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
up () {
|
||
|
docker network create pew-net || true
|
||
|
|
||
|
# Exposed on port 8123 on pew-net
|
||
|
docker run \
|
||
|
--detach \
|
||
|
--name ha \
|
||
|
--restart unless-stopped \
|
||
|
--env TZ=America/New_York \
|
||
|
--volume /bigdata/ha/config:/config:rw \
|
||
|
--volume /run/dbus:/run/dbus:ro \
|
||
|
--device /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220080742-if00 \
|
||
|
--network pew-net \
|
||
|
ghcr.io/home-assistant/home-assistant:stable
|
||
|
}
|
||
|
|
||
|
down () {
|
||
|
docker stop ha || true
|
||
|
docker rm ha || true
|
||
|
}
|
||
|
|
||
|
logs () {
|
||
|
docker logs --follow ha
|
||
|
}
|
||
|
|
||
|
$@
|