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

pid files for multiple instances of named in chroot



hi

little tiny issue. I'm running x2 instances of named on an i386 3.4 OBSD box

I added some bits to rc and rc.conf that essentially start named twice with the following args

named -c /var/named/etc/named_primary.conf -t /var/named -u named

named -c /var/named/etc/named_secondary.conf -t /var/named -u named


the named_primary.conf and named_secondary.conf files have the following set at the top of each respective file


named_primary.conf
options {
        directory "named_primary";
        pid-file "named_primary.pid";
};


named_secondary.conf options { directory "named_secondary"; pid-file "named_secondary.pid"; };


the problem I am having, is that the pid-file settings seem to be ignored. both instances start, but it looks like the first creates /var/run/named.pid with it's pid, then that gets overwritten by the secondary starting up and overwriting it's pid to /var/run/named.pid. when I cat /var/run/named.pid, it always contains the pid of the named_secondary process ?!?


it's not a big problem at the moment, as I can use ps and kill -HUP the correct pid from the list, but I'm writing some operator shell script panels, and need to be able to distinguish between the primary and secondary pids

any ideas ?

if not, I guess I could write something to grep and awk the correct instance pid from ps -ax, but /var/run/named<instance> would be a little easier (plus I am curious what I have done wrong)

many thanks for any suggestions

_scott



Visit your host, monkey.org