1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
On Monday 03 May 2004 10:50, Allen D Parker wrote: |
5 |
> We can actually probably do this in bash fairly simply (although |
6 |
> unless each service is started in sequence or in a seperate |
7 |
> shellspace, it might be a problem) parallel start + bash variables = |
8 |
> nastiness. |
9 |
> |
10 |
> for each initscript SVCNAME="apache2" |
11 |
> then in the actual runscript, something like this would do just fine |
12 |
> (imho) for 99% of what would need to be supported: |
13 |
> |
14 |
> SVCHOME=`whereis ${SVCNAME} | cut -d " " -f 2` |
15 |
> if ${SVCNAME} != `ps aux | grep ${SVCHOME}`; then |
16 |
> /etc/init.d/${SVCNAME} zap && |
17 |
> /etc/init.d/${SVCNAME} start |
18 |
> else |
19 |
> SVC_STATUS="alive" |
20 |
> fi |
21 |
|
22 |
I was more thinking of providing an extra function (say "status()") that |
23 |
would have a positive result if the service is actually running and a |
24 |
negative result if it is not. The handler script/program should then be |
25 |
able to handle this function. |
26 |
|
27 |
Paul |
28 |
|
29 |
- -- |
30 |
Paul de Vrieze |
31 |
Gentoo Developer |
32 |
Mail: pauldv@g.o |
33 |
Homepage: http://www.devrieze.net |
34 |
-----BEGIN PGP SIGNATURE----- |
35 |
Version: GnuPG v1.2.4 (GNU/Linux) |
36 |
|
37 |
iD8DBQFAlgtrbKx5DBjWFdsRAhbPAKC1Odou8xvkbFDq88+XZWsHn61ZmQCeLZFu |
38 |
mWaX+8vIxnS8J8QNcXd6s84= |
39 |
=6SqF |
40 |
-----END PGP SIGNATURE----- |
41 |
|
42 |
-- |
43 |
gentoo-dev@g.o mailing list |