@deHakkelaar Thanks.
Saw that earlier. Tried without success.
Changed path to /usr/sbin/unbound-control to match the correct path and weekly to daily.
Permissions and ownership are OK.
sudo service unbound restart
Change from weekly to daily shouldn't make the difference for success.
Tomorrow I will post if the logs are rotated.
Thats ok. logrotate runs as the root user so can access or run anything.
But it wont change current ownership/permissions of the logs unless if you tell it to.
If you comment out that line in the pi-hole unbound configuration file, the log will go into syslog and be rotated automatically. With verbosity 0, there are no unbound entries on a daily basis. With verbosity 1, just a few.
# If no logfile is specified, syslog is used
# logfile: "/var/log/unbound/unbound.log"
verbosity: 0
note that --force will rotate file(s) even if they do not meet the specified criteria such as minsize, age, etc.
Ah well ... wait
EDIT:
pi@ph5:~ $ man logrotate
[..]
-f, --force
Tells logrotate to force the rotation, even if it doesn't
think this is necessary. Sometimes this is useful after
adding new entries to a logrotate config file, or if old
log files have been removed by hand, as the new files will
be created, and logging will continue correctly.
[1602008337] unbound-control[6703:0] warning: control-enable is 'no' in the config file.
[1602008337] unbound-control[6703:0] error: connect: Connection refused for 127.0.0.1 port 8953
error: error running shared postrotate script for '/var/log/unbound/unbound.log '
pi@ph5:~ $ man unbound.conf
[..]
control-enable: <yes or no>
The option is used to enable remote control, default is
"no". If turned off, the server does not listen for control
commands.
Found the same online. control-enable: yes in /etc/unbound/unbound.conf.d/pi-hole.conf: sudo service unbound restart sudo systemctl status unbound.service
Oct 06 20:36:34 PIHOLE systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Oct 06 20:36:34 PIHOLE systemd[1]: unbound.service: Failed with result 'exit-code'.
Oct 06 20:36:34 PIHOLE systemd[1]: Failed to start Unbound DNS server.
Oct 06 20:36:34 PIHOLE systemd[1]: unbound.service: Service RestartSec=100ms expired, scheduling restart.
Oct 06 20:36:34 PIHOLE systemd[1]: unbound.service: Scheduled restart job, restart counter is at 5.
Oct 06 20:36:34 PIHOLE systemd[1]: Stopped Unbound DNS server.
Oct 06 20:36:34 PIHOLE systemd[1]: unbound.service: Start request repeated too quickly.
Oct 06 20:36:34 PIHOLE systemd[1]: unbound.service: Failed with result 'exit-code'.
Oct 06 20:36:34 PIHOLE systemd[1]: Failed to start Unbound DNS server.