Am 03.09.2016 um 10:09 schrieb Mick Sulley: > My code relies on aliases and so I wanted to copy the correct version of > owfs.conf to /etc/owfs.conf and I assumed that I would need to restart > after that for it to be read and the correct alias file used. > No. Owserver monitors its config file and restarts automatically. When you start
# owserver --debug -c myowfs.conf you see ---------------------------------------------------------------------- DEBUG: ow_inotify.c:(52) Configuration file change -- time to resurrect DEBUG: ow_inotify.c:(61) Configuration file change detected. Will restart /opt/owfs/bin/owserver CALL: ow_exec.c:(114) Restarting /opt/owfs/bin/owserver DEBUG: ow_net_server.c:(374) Stop listening process DEBUG: ow_net_server.c:(378) Listening loop stopped DEBUG MODE libow version: 3.1p4 ---------------------------------------------------------------------- as soon myowfs.conf is written to. There is a drawback: When you write the configuration file, you have to do that in one action. Scripting languages usually do this, they buffer all the output written to a file and flush it on a "flush" or "close" command. > The thing I don't understand is that it is not the restart that causes > the failure, it is the copy. I have tried it without the restart line > and it still fails. Does owserver continually read /etc/owfs.conf and > detect that it being written? > That is because your cp command triggers a restart in owserver and you get a few seconds in which it is unresponsive. Kind regards Jan ------------------------------------------------------------------------------ _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers