NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

How can I stop a script running as "deamon" from rc.d?



Dear list

I am running amd64 rel 5.1 (binary, GENERIC kernel) on my laptop.

My wireless network access point removes my connection if there are
no requests for a certain amount of time.

To show that I'm still alive, I've cooked up a tiny script which sends
a single ping to the nameserver once a minute.  The address is taken
from resolv.conf.

I prefer to start the script (called /usr/local/sbin/keepalive) from
rc.conf just like wpa_supplicant and dhclient.

The script starts and functions nicely with command_args='&' in
/etc/rc.d/keepalive.  However, if I stop it, with the command:
        /etc/rc.d/keepalive stop
I get the question
        keepalive not running?
probably because ps says, "/bin/sh /usr/local/sbin/keepalive" is the
command which runs the script.

How do I teach my rc.d/keepalive script to find the right program
to kill?

Hans


Home | Main Index | Thread Index | Old Index