Rename project from system-stats-daemon to systant
- Updated all module names from SystemStatsDaemon to Systant - Renamed application config from :system_stats_daemon to :systant - Updated service files and documentation - Release binary now at _build/prod/rel/systant/bin/systant 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
defmodule SystemStatsDaemon do
|
||||
defmodule Systant do
|
||||
@moduledoc """
|
||||
Documentation for `SystemStatsDaemon`.
|
||||
Documentation for `Systant`.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
@@ -8,7 +8,7 @@ defmodule SystemStatsDaemon do
|
||||
|
||||
## Examples
|
||||
|
||||
iex> SystemStatsDaemon.hello()
|
||||
iex> Systant.hello()
|
||||
:world
|
||||
|
||||
"""
|
||||
@@ -1,4 +1,4 @@
|
||||
defmodule SystemStatsDaemon.Application do
|
||||
defmodule Systant.Application do
|
||||
# See https://hexdocs.pm/elixir/Application.html
|
||||
# for more information on OTP Applications
|
||||
@moduledoc false
|
||||
@@ -8,12 +8,12 @@ defmodule SystemStatsDaemon.Application do
|
||||
@impl true
|
||||
def start(_type, _args) do
|
||||
children = [
|
||||
{SystemStatsDaemon.MqttClient, []}
|
||||
{Systant.MqttClient, []}
|
||||
]
|
||||
|
||||
# See https://hexdocs.pm/elixir/Supervisor.html
|
||||
# for other strategies and supported options
|
||||
opts = [strategy: :one_for_one, name: SystemStatsDaemon.Supervisor]
|
||||
opts = [strategy: :one_for_one, name: Systant.Supervisor]
|
||||
Supervisor.start_link(children, opts)
|
||||
end
|
||||
end
|
||||
@@ -1,4 +1,4 @@
|
||||
defmodule SystemStatsDaemon.MqttClient do
|
||||
defmodule Systant.MqttClient do
|
||||
use GenServer
|
||||
require Logger
|
||||
|
||||
@@ -11,7 +11,7 @@ defmodule SystemStatsDaemon.MqttClient do
|
||||
end
|
||||
|
||||
def init(_opts) do
|
||||
config = Application.get_env(:system_stats_daemon, __MODULE__)
|
||||
config = Application.get_env(:systant, __MODULE__)
|
||||
Logger.info("Starting MQTT client with config: #{inspect(config)}")
|
||||
|
||||
# Use a unique client ID to avoid conflicts
|
||||
@@ -32,7 +32,7 @@ defmodule SystemStatsDaemon.MqttClient do
|
||||
|
||||
# Send immediate hello message
|
||||
hello_msg = %{
|
||||
message: "Hello - system_stats_daemon started",
|
||||
message: "Hello - systant started",
|
||||
timestamp: DateTime.utc_now() |> DateTime.to_iso8601(),
|
||||
hostname: get_hostname()
|
||||
}
|
||||
@@ -64,7 +64,7 @@ defmodule SystemStatsDaemon.MqttClient do
|
||||
|
||||
defp publish_stats(config, client_id) do
|
||||
stats = %{
|
||||
message: "Hello from system_stats_daemon",
|
||||
message: "Hello from systant",
|
||||
timestamp: DateTime.utc_now() |> DateTime.to_iso8601(),
|
||||
hostname: get_hostname()
|
||||
}
|
||||
Reference in New Issue
Block a user