1

I stupidly deleted /var/log/dhcpd.log

So, I stopped the service, created a new dhcpd.log file with the same ownership / rights etc. as the old file, and restarted the service.

But nothing is being written to the log file now.

Am I missing something?

Simon
  • 11
  • 1
  • 2
  • are you using ubuntu 16.xx? How does your dhcpd.conf and syslog.conf file looks like? Have you checked that? – bhordupur Dec 06 '17 at 13:20
  • Did you get any errors? Maybe there is just nothing to be logged so far .. ? – derHugo Dec 06 '17 at 13:24
  • I'm using 14.04dhcpd.conf has the line log-facility local7; – Simon Dec 06 '17 at 13:36
  • Oh, and just to confirm, it was logging to dhcpd.log just fine. I just deleted the file by mistake. But now, after recreating and restarting the service, it isnt logging – Simon Dec 06 '17 at 13:38

1 Answers1

1

dhcpd is using syslog for logging so you need to restart the service rsyslogd.

  • I did try that, and it had no effect. But after waiting until the following day it started working again. I guess it was something to do with the log file rotation which helped sort itself out. – Simon Jan 02 '18 at 16:30