Add ha-watchdog v1.1.0 Go tool that lists Home Assistant apps, lets you choose which to watch, and starts them again if they stop. - Interactive menu to list apps (numbered, with state, version and available updates) and add or remove them from a watchlist - Headless -daemon mode that monitors the saved watchlist - Persistent JSON watchlist - Retry cap (default 5 starts per 10 minutes) with a cooldown between attempts; gives up on apps that keep failing - Persistent notifications on restart and when giving up - Skips apps that are unavailable, detached or not installed - Backends: Supervisor API, local ha CLI, and remote ha CLI over SSH for running from a separate monitoring machine - Version and build date injected via ldflags (see Makefile) - README covering build, install, remote monitoring and systemd setup
19 lines
501 B
Makefile
19 lines
501 B
Makefile
VERSION ?= 1.1.0
|
|
BUILD_DATE := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
export CGO_ENABLED := 0
|
|
LDFLAGS := -s -w -X main.version=$(VERSION) -X main.buildDate=$(BUILD_DATE)
|
|
|
|
.PHONY: build arm64 amd64 clean
|
|
|
|
build:
|
|
go build -ldflags "$(LDFLAGS)" -o ha-watchdog .
|
|
|
|
arm64:
|
|
GOOS=linux GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o ha-watchdog-arm64 .
|
|
|
|
amd64:
|
|
GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o ha-watchdog-amd64 .
|
|
|
|
clean:
|
|
rm -f ha-watchdog ha-watchdog-arm64 ha-watchdog-amd64
|