# OpenLDAP logrotate



## glocke (Jan 30, 2012)

Hi, 

I noticed, that sending a SIGHUP to the slapd daemon just kills it. Accourding to the maillinglist, one should do a */path/to/startscript restart* when log rotating. I could not find any sample how this could be accomplished within FreeBSD. The Samba + LDAP Howto also does not mention any log rotation :-(

If someone could point me to the right direction, it just would be marvellous.


----------



## SirDice (Jan 30, 2012)

glocke said:
			
		

> I could not find any sample how this could be accomplished within FreeBSD.


Have a look at newsyslog(8) and newsyslog.conf(5).


----------



## glocke (Jan 30, 2012)

Hi SirDice, 

unfortunately I can only see how to send a signal to a process after rotating. Sending a signal to slapd kills it. I would like to run a program after rotating such as [cmd=]
/usr/local/etc/rc.d/slapd restart[/cmd] without installing sysutils/syslog-ng or the likes. Is it possible? How do other OpenLDAP users handle this?


----------



## SirDice (Jan 30, 2012)

Read newsyslog.conf(5):

```
N       indicates that there is no process which needs to be sig-
                     naled when this log file is rotated.

             R       if this flag is set the newsyslog(8) will run shell com-
                     mand defined in path_to_pid_cmd_file after rotation
                     instead of trying to send signal to a process id stored
                     in the file.
```


----------



## glocke (Jan 30, 2012)

```
uname -r
8.2-RELEASE-p6
```
Thanks for the pointer, can't find this in my local man pages, this was added in May 2011:
http://lists.freebsd.org/pipermail/svn-src-all/2011-May/038966.html
Guess I'll patch the source or update to FreeBSD-9


----------

