[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: A tor error message prior to crash
Hi!
On Wed, May 13, 2009 at 03:23:23PM +0200, Ruben Garcia wrote:
>I've been using
>while [[1]]; do restart software; sleep 60; done
>for programs with memory leaks or other stability problems (not for tor,
>since it works fine for me).
>Of course, that means connections will die every few hours, but
>persistent connections will only hit your node every now and then.
>If you are not babysitting the node anyway, a downtime of a couple
>minutes every now and then won't hurt you.
>P.S. I'm not very sure about the bash syntax, so check it if you find it
>useful.
while true; do
foo
sleep 3600
done
would repeat foo every 1h.
But then, you could instead enter foo in an appropriate crontab.
That's what I did:
* * * * * /usr/local/sbin/tor-check
in root's crontab
# cat /usr/local/sbin/tor-check
#! /bin/sh
pgrep -x tor >/dev/null || /etc/init.d/tor start
(Linux specific; pgrep is already available on some other systems, too,
but then starting tor would be done a bit differently.)
Kind regards,
Hannah.