I want to copy ca file to establish ssl connection. I am placing the CA inside lib
lib/
mymodule.ex #using the ca path here
mycrt.crt
and then using mix firmware
I am giving the relative path like this
def getPath() do
{path,0} = System.cmd("pwd",[])
String.replace(path,"\n","/lib/mycrt.crt")
end
But we run on host using iex -S mix
so I have to prefix the /lib
before mycrt.crt
I am not sure whether it is properly getting copied in /lib
or pwd
is getting the right path after burning on device. Is this a proper way of doing? Because when I am doing ls
on device I cannot see mycrt.crt
copied in directory
What is the right way to copy files over device using Nerves?