Jarry wrote:
> Greetings to all Gentoo-users!
> 
> Is it somehow possible to check, whether a certain process is running,
> and if not, then start it? I would like to use it for some processes
> that crush sometimes (like teamspeak and some game-servers), and to
> mointor sshd, because it is critical for me (my server will be 300km
> away from me).
> 
> I thought about writing some small shell-script, which would be run
> by cron at regular intervals, check if a process is running (something
> like "ps -e | grep $PROCNAME", or maybe with "pidof -s $PROCNAME")
> and if not, than it would start that process with its script in
> /etc/init.d.
> 
> But if there is already something which would do the same, I don't
> want to work on inventing the wheel again. Moreover, my shell scripts
> are rather "quick'n'dirty", so maybe I should start with reading
> "Advanced Bash-Scripting Guide"...
> 
> Jarry
> 

emerge -pv sys-process/daemontools

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-process/daemontools-0.76-r4  -doc (-selinux) -static
36 kB
-- 
gentoo-user@gentoo.org mailing list

Reply via email to