Catch dnsmasq failures.

This will break dns redirection if dnsmasq fails, but
configuration will still work.
pull/633/head
connor rigby 2018-09-09 10:17:14 -07:00
parent 2debbc4fa3
commit bae7f7c1a1
No known key found for this signature in database
GPG Key ID: 24DC438382965C3B
1 changed files with 6 additions and 6 deletions

View File

@ -45,12 +45,12 @@ defmodule Farmbot.Target.Bootstrap.Configurator.CaptivePortal do
{:ok, dhcp_server} = DHCPServer.start_link(@interface, dhcp_opts)
dnsmasq =
case setup_dnsmasq(@address, @interface) do
{:ok, dnsmasq} -> dnsmasq
{:error, _} ->
Logger.error 1, "Failed to start DnsMasq"
nil
end
case setup_dnsmasq(@address, @interface) do
{:ok, dnsmasq} -> dnsmasq
{:error, _} ->
Logger.error 1, "Failed to start DnsMasq"
nil
end
wpa_pid = wait_for_wpa()
Nerves.WpaSupplicant.request(wpa_pid, {:AP_SCAN, 2})