- MQTT client with configurable broker connection - Periodic system stats publishing (30s interval) - Command listening on MQTT topic with logging - Systemd service configuration - NixOS module for declarative deployment 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
510 B
Elixir
20 lines
510 B
Elixir
defmodule SystemStatsDaemon.Application do
|
|
# See https://hexdocs.pm/elixir/Application.html
|
|
# for more information on OTP Applications
|
|
@moduledoc false
|
|
|
|
use Application
|
|
|
|
@impl true
|
|
def start(_type, _args) do
|
|
children = [
|
|
{SystemStatsDaemon.MqttClient, []}
|
|
]
|
|
|
|
# See https://hexdocs.pm/elixir/Supervisor.html
|
|
# for other strategies and supported options
|
|
opts = [strategy: :one_for_one, name: SystemStatsDaemon.Supervisor]
|
|
Supervisor.start_link(children, opts)
|
|
end
|
|
end
|