You could also just restart owhttpd in a loop. If owhttpd is already
running, the new one will fail since the port will not be available.
I.e.
while :
do /opt/owfs/bin/owhttpd -p 4444 -u
sleep 300
done
On Mon, Feb 13, 2012 at 1:13 PM, Jerry Scharf <
[email protected]> wrote:
> Roberto,
>
> Assuming you are running on some kind of *nix, why not use cron to do
> this? You would create a crontab entry that looked like:
> */5 * * * * /path/to/restart/script
> (if there is only a global crontab file, the entry would look like
> */5 * * * * owhttpduser /path/to/restart/script)
>
> then the script just does one restart and never needs to deal with all
> the issues of working when the system comes up and all the corner cases
> of rescheduling. Make sure to set execute permission on the script and
> check for the pid file or the listening tcp socket so it gracefully
> handles the case where owhttd is not running yet.
>
> jerry
>
>
> On 02/13/2012 09:13 AM, Roberto Spadim wrote:
> > hi guys, i´m having to restart my owhttpd each 5 minutes
> > can anyone help me with a bash script to do this job?
> >
> > i was thinking about runnning the bash as a background process
> > /etc/rc.d/rc0.d/owhttpd&
> >
> > inside owhttpd i have:
> >
> > #!/bin/sh
> > real_owhttpd=/opt/bin/owhttpd
> > while true; do
> > $real_owhttpd -d /dev/ttyUSB* -p 80&
> > sleep 300;
> > killall $real_owhttpd
> > done
> >
> >
> > does anyone know how to do this but without using killall? some arm
> > distros don´t have killall
> >
> >
> ------------------------------------------------------------------------------
> > Try before you buy = See our experts in action!
> > 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-dev2
> > _______________________________________________
> > Owfs-developers mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> 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-dev2
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
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-dev2
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers