/etc/rc.d/named restart issue (command not found)

Guys,

I am new to FreeBSD. I have this weird issue where when i issue the command "/etc/rc.d/named restart" i get --> command not found.
I am running BIND 9.6.-ESV-R3 on FreeBSD 8.2
I have added named_enable="YES" in rc.conf as per manual
named works great: No issue there. I just would like to be able to restart named without having to reboot my server.

Any help is much appreciated of course :slight_smile:

Kind Regards,

I don't use FreeBSD but the command is a bit like this...

# kill -HUP `cat /var/run/named.pid`

I'll explain: kill sends a signal to the process, the default signal is TERM, which asks the process kindly to terminate. The HUP option sends HANGUP, which asks the process to hang up on everyone, reload its configuration, and start listening again. A really stubborn process can be killed by the kernel itself, with the KILL option. This is how you restart services on UNIX. You would already know, but Linux devs like appeasing the stupid.

I should also point out I don't use freebsd, but I don't think there is a good reason to touch anything at all in /etc/rc.d, I am more of an OpenBSD person.

I too don't have FreeBSD.

You are running as the root user aren't you?

First check that the script exists.

file /etc/rc.d/named

Then read the script. It may not have a "restart" option. More likely to have "stop" and "start" options.

Just in case this is basic.

You did type:
/sbin/rc2.d/named restart
not:
"/sbin/rc2.d/named restart"

Guys,

Thank you very much for your reply.
I have reinstalled my server and now the command line "/etc/rc.d/named restart" works.
I really dont know what happend there but had to make it work because could not reboot my server every time.
Though, thank you again for all the details you have provided above. That is very interesting :slight_smile: FreeBSD has a step learning curve but loads of fun.

Regards,

zongo

1 Like