View Source Medic.Checks.Hosts (Medic v1.9.1)

Host-related checks

Link to this section Summary

Functions

Uses hostess to check that the given host exists in /etc/hosts, and if not, suggests using hostess to add the host pointing at 127.0.0.1.

Link to this section Functions

Link to this function

host_exists?(host, opts \\ [])

View Source
@spec host_exists?(
  binary(),
  keyword()
) :: Medic.Check.check_return_t()

Uses hostess to check that the given host exists in /etc/hosts, and if not, suggests using hostess to add the host pointing at 127.0.0.1.

Assumes that hostess is installed.

Accepts a remedy option.

{Medic.Checks.Hosts, :host_exists?, ["myapp.local"]}
{Medic.Checks.Hosts, :host_exists?, ["myapp2.local", remedy: "sudo hostess add myapp2 127.0.0.2"]}