| Weblog: | Advertising Rendezvous services in Linux | |
| Subject: | why not use mDNSResponder instead of mdNSProxyResponder? | |
| Date: | 2003-05-12 08:01:42 | |
| From: | anonymous2 | |
|
Response to: why not use mDNSResponder instead of mdNSProxyResponder?
|
||
| I'm trying to write a redhat init script to turn the responder on and off. The daemonized version, how can I look up the PID to kill it (and therefore allow the script to respond to a "service rendezvous stop" command)? | ||
Showing messages 1 through 2 of 2.
-
Stopping the service
2003-05-12 08:41:20 rflicken [Reply | View]
The quickest way is to just run killall mDNSProxyResponder to kill the job by name. You could also do something like kill `ps ax|grep mDNSProxyResponder|grep -v grep|awk '{print $1}'` (although the first one is much simpler...) -
Stopping the service
2003-05-14 00:52:21 anonymous2 [Reply | View]
The proper way to write an init script is to use the init.d functions in /etc/rc.d/init.d/functions by calling them at the start of the script. See other init scripts for an example.
These functions handle all pid details for you, and more. Find more info on them at:
http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/iniscrptfunc.html
Steven Boger
sboger@hotmail.com
| Showing messages 1 through 2 of 2. |



