Skip to content

Instantly share code, notes, and snippets.

@kometchtech
Created October 6, 2015 01:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kometchtech/06fc3326c83338afd151 to your computer and use it in GitHub Desktop.
Save kometchtech/06fc3326c83338afd151 to your computer and use it in GitHub Desktop.
logrotate unbound
/var/log/unbound/*.log {
weekly
rotate 7
missingok
notifempty
compress
delaycompress
sharedscripts
create 644
postrotate
/usr/local/sbin/unbound-control log_reopen
endscript
}
@mhf-ir
Copy link

mhf-ir commented Jan 10, 2019

👍

@mhf-ir
Copy link

mhf-ir commented Jan 10, 2019

Ubuntu 18.04 unbound-control path is

	postrotate
		/usr/sbin/unbound-control log_reopen
	endscript

@EvgenyEK
Copy link

maybe remove full path from postrotate command ?
in common it work fine.

@CompuRoot
Copy link

maybe remove full path from postrotate command ?
in common it work fine.

Assume a hacker will drop somewhere in a PATH malicious script with name unbound-control and guess what happened if you will do that.
Never ever relay on PATH in system operation, cron and so on if you want to sleep well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment