Fix node_name status worker

pull/974/head
Connor Rigby 2019-08-12 08:02:13 -07:00
parent d8084e9cb3
commit 0e0784fcbd
No known key found for this signature in database
GPG Key ID: 29A88B24B70456E0
1 changed files with 3 additions and 1 deletions

View File

@ -61,8 +61,10 @@ defmodule FarmbotOS.Platform.Target.Network.Utils do
def init_net_kernel do
{:ok, hostname} = :inet.gethostname()
name = :"farmbot@#{hostname}.local"
_ = :os.cmd('epmd -daemon')
_ = :net_kernel.stop()
:net_kernel.start([:"farmbot@#{hostname}.local"])
FarmbotCore.BotState.set_node_name(to_string(name))
:net_kernel.start([name])
end
end