Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: [OT] attach a perl script to daemon services
Date: Fri, 26 Feb 2010 23:03:30
Message-Id: 201002270100.43223.alan.mckinnon@gmail.com
In Reply to: [gentoo-user] Re: [OT] attach a perl script to daemon services by Harry Putnam
1 On Friday 26 February 2010 23:44:03 Harry Putnam wrote:
2 > Where I'm weak is the part where the custom script checks if the
3 > daemon is running, before the script itself starts. That part would
4 > need to be something pretty fool proof... maybe just grep ps output
5 > for the daemon?
6
7 Maybe I'm misunderstanding you, but I don't understand this approach.
8
9 If the daemon is not running there's nothing in the fifo. Why got to all the
10 complexity of writing an independent program that checks if something is
11 running then does various actions? The script necessarily depends on the
12 daemon running so instead of checking if it is, simply have the daemon start
13 the script. No daemon running = no script launched = no complexity.
14
15 The script will simply accept what is it is given, no complex checks needed.
16 Seeing as the input is from a logger, chances are you are inserting logs to a
17 db, or launching a log analyser, right? Modern loggers support launching child
18 scripts as a matter of routine.
19
20 If I'm still off-bat and this approach cannot work for solid technical
21 reasons, then I'll go away and shut if if you say so :-)
22
23 --
24 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] Re: [OT] attach a perl script to daemon services Michael Higgins <linux@×××××××.org>
[gentoo-user] Re: [OT] attach a perl script to daemon services Harry Putnam <reader@×××××××.com>