EpmdUp (EpmdUp v0.2.0)
View SourceA simple Elixir module to check and manage the Erlang Port Mapper Daemon (epmd
).
Summary
Functions
Starts the Erlang Port Mapper Daemon (epmd
) if it's not already running.
Checks if the Erlang Port Mapper Daemon (epmd
) is active and accepting connections.
Stops the Erlang Port Mapper Daemon (epmd
)
using Kill EPMD
if it's running
Finds the full path of the Erlang Port Mapper Daemon (epmd
) executable in the system.
Functions
@spec activate() :: :ok | {:error, term()}
Starts the Erlang Port Mapper Daemon (epmd
) if it's not already running.
@spec active?() :: boolean()
Checks if the Erlang Port Mapper Daemon (epmd
) is active and accepting connections.
This function attempts to establish a TCP connection to the epmd
port (4369) on localhost.
If the connection is successful, it means epmd
is running and accepting connections.
Returns
true
- ifepmd
is active and accepting connectionsfalse
- ifepmd
is not running or not accepting connections
@spec deactivate() :: :ok | {:error, term()}
Stops the Erlang Port Mapper Daemon (epmd
)
using Kill EPMD
if it's running
@spec find_epmd_executable() :: binary() | nil
Finds the full path of the Erlang Port Mapper Daemon (epmd
) executable in the system.
Returns nil
if the executable cannot be found in the system's PATH.