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 |