# Supervise & newsyslog logrotate



## karolyi (Dec 11, 2012)

Hi,

I've set up logrotating with executing a script using the R flag in newsyslogs config. It seems that it's not working, the script gets not executed. I can execute it manually, then it sends the HUP signal to the given daemon, but newsyslog itself seems to ignore the R flag.

The script has executable flags.

I wonder, the default configuration comment part says for the flags:


```
The 'flags' field is one or more of the letters: BCDGJNUXZ or a '-'.
```

So the R flag is not here, although it's there in the newsyslog.conf manpage.
Revision info:

```
$FreeBSD: src/etc/newsyslog.conf,v 1.54.2.3 2012/11/17 11:36:10 svnexp Exp $
```

Any ideas?


----------



## SirDice (Dec 11, 2012)

Why don't you let newsyslog(8) send the SIGHUP?


----------



## karolyi (Dec 11, 2012)

SirDice said:
			
		

> Why don't you let newsyslog(8) send the SIGHUP?



Because there's no pidfile. I use supervise (as noted in the topic name), and lighttpd2. Both aren't capable of creating a pidfile. The only way of sending a HUP signal is svc -h servicedir.


----------



## karolyi (Dec 11, 2012)

Supervise = daemontools (http://cr.yp.to/daemontools.html)


----------



## SirDice (Dec 11, 2012)

Make sure you use the full path to commands. The PATH is rather limited.


----------



## karolyi (Dec 11, 2012)

SirDice said:
			
		

> Make sure you use the full path to commands. The PATH is rather limited.



Still doesn't seem to work. I indeed had the command in the script without a path, but corrected it, and ran 
	
	



```
newsyslog -F -v
```
 to test, and got no errors or even notifications that the scriptfile got executed. The daemon haven't received any signal.


----------



## pprocacci (Jan 16, 2013)

I had this same problem.  I opened the following bug report and worked with Mark from the BSD team on this.

http://www.freebsd.org/cgi/query-pr.cgi?pr=175330

The patch supplied in that pr fixed the problem I was having.


----------

