Gentoo Archives: gentoo-user

From: Jarry <jarry@×××.net>
To: gentoo-user@l.g.o
Subject: [gentoo-user] automatic restart of crushed processes...
Date: Tue, 26 Jul 2005 10:05:23
Message-Id: 42E609A5.5040705@gmx.net
1 Greetings to all Gentoo-users!
2
3 Is it somehow possible to check, whether a certain process is running,
4 and if not, then start it? I would like to use it for some processes
5 that crush sometimes (like teamspeak and some game-servers), and to
6 mointor sshd, because it is critical for me (my server will be 300km
7 away from me).
8
9 I thought about writing some small shell-script, which would be run
10 by cron at regular intervals, check if a process is running (something
11 like "ps -e | grep $PROCNAME", or maybe with "pidof -s $PROCNAME")
12 and if not, than it would start that process with its script in
13 /etc/init.d.
14
15 But if there is already something which would do the same, I don't
16 want to work on inventing the wheel again. Moreover, my shell scripts
17 are rather "quick'n'dirty", so maybe I should start with reading
18 "Advanced Bash-Scripting Guide"...
19
20 Jarry
21
22 --
23 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] automatic restart of crushed processes... Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] automatic restart of crushed processes... "Mariusz Pękala" <skoot@××.pl>
Re: [gentoo-user] automatic restart of crushed processes... Bastian Balthazar Bux <BastianBalthazarBux@×××××××××.it>