[Nut-upsuser] UPSLog rotating
    Tuc at T-B-O-H.NET 
    ml at t-b-o-h.net
       
    Wed Sep 17 15:07:55 UTC 2008
    
    
  
Hi,
	Trying to rotate the ups.log on a FreeBSD 7.0 system
and its not being nice about it.
	I tried the "quick and dirty" way by doing :
	mv /var/log/ups.log ${DATEDDIRECTORY}/ups.log
	kill -1 `cat /var/db/nut/upslog.pid`
	I get :
Sep 17 10:57:20 valhalla upslog[81972]: could not reopen logfile /var/log/ups.log: Permission denied
	So I stop upslog, remove the file, and start it to get a
clean/fresh file. It shows me :
-rw-r--r--  1 root  wheel  36 Sep 17 10:59 /var/log/ups.log
	So I change my script to :
	mv /var/log/ups.log ${DATADIRECTORY}/ups.log
	touch /var/log/ups.log
	chown root:wheel /var/log/ups.log
	chmod 644 /var/log/ups.log
	kill -1 `cat /var/db/nut/upslog.pid`
	but I'm still getting :
Sep 17 10:59:48 valhalla upslog[82020]: Signal 1: reopening log file
Sep 17 10:59:48 valhalla upslog[82020]: could not reopen logfile /var/log/ups.log: Permission denied
	Any thoughts where I'm going wrong??
		Thanks, Tuc
    
    
More information about the Nut-upsuser
mailing list