I find I have to wait for owserver to come up first by delaying until owdir
finds devices, then moving on.
Bruce

-------

owserverp="/opt/owfs/bin/owserver -u -p 3000"
owfsp="/opt/owfs/bin/owfs -s 3000 /mnt/1wire"
owhttpdp="/opt/owfs/bin/owhttpd -s 3000 -p 3001"
owdir="/opt/owfs/bin/owdir -s 3000"
~~~~~~~~
     $owserverp
     owd=$( $owdir )
     owl=${#owd}
           while [ $owl -lt 1 ]
           do
         echo -ne "."
         owd=$( $owdir )
         owl=${#owd} 
         done 
           echo "OK."
           echo " ----- Begin Device Report -----:"
           echo $owd;
           echo " -----  End Device Report  -----:"
           echo -ne "Starting owfs[$owfsp]..."
           $owfsp
     echo "OK."
     echo -ne "Starting owhttpd[$owhttpdp]..."
     $owhttpdp
     echo "OK."
~~~~~~~~~
       
-----Original Message-----
From: klas englund [mailto:tcmsk...@gmail.com] 
Sent: Wednesday, February 01, 2012 8:48 AM
To: owfs-developers@lists.sourceforge.net
Subject: [Owfs-developers] How to setup a reliable,sychronized
(automatic)system restart

Beeing a newbe in the Linux world...

I have a setup where one old and slow computer is doing parts of the
datacollection usining owserver under debian, and another faster
server to consolidate all inputs and running a control system based on
that input data.

Now, at a power outage (living on the country side...) the server
starts much faster than the data collecing machine. In my setup that
prevents the owfs on the server to find the transducers on the
collecting computer.  Which in turn prevents the control application
to run properly. It seems that the owserver on the server is unable to
detect the other owserver on the collector when the collector comes up
after the server.

I am able to do semiautomatic restarts if I control the power switches
in the proper sequense i.e. waiting for the collector to start before
starting the server. I need some kind of syncronization, I think.

How can I implement a reliable startup sequence ?

regards
tcmsklas

----------------------------------------------------------------------------
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to