logrotate foolished Tor
This might be a a corner case (happened 1x in the last year for about 10 bridges), but nevertheless:
Jan 03 00:00:02.000 [notice] Received reload signal (hup). Reloading config and resetting internal state.
Jan 03 00:00:02.000 [notice] Read configuration file "/etc/tor/torrc".
Jan 03 00:00:02.000 [warn] Unrecognized BridgeDistribution value "telegram". I'll assume you know what you are doing...
Jan 03 00:00:02.000 [notice] Tor 0.4.9.0-alpha-dev (git-e5b51eb10f6802ea) opening log file.
Jan 03 00:00:02.000 [warn] Couldn't open file for 'Log warn file /var/log/tor/warn.log': Permission denied
Jan 03 00:00:02.000 [warn] Couldn't open file for 'Log warn file /var/log/tor/warn.log': Permission denied
Jan 03 00:00:02.000 [warn] Failed to parse/validate config: Failed to init Log options. See logs for details.
Jan 03 00:00:02.000 [err] Reading config failed--see warnings above. For usage, try -h.
Jan 03 00:00:02.000 [warn] Restart failed (config error?). Exiting.
It is configured like all the others, especially /etc/logrotate.d/tor:
/var/log/tor/warn.log {
daily
rotate 5
compress
delaycompress
missingok
notifempty
create 0640 tor tor
sharedscripts
postrotate
if invoke-rc.d tor status > /dev/null; then
invoke-rc.d tor reload > /dev/null
fi
endscript
}
/var/log/tor/notice.log {
daily
rotate 5
compress
delaycompress
missingok
notifempty
create 0640 tor tor
sharedscripts
postrotate
if invoke-rc.d tor status > /dev/null; then
invoke-rc.d tor reload > /dev/null
fi
endscript
}
The systemd restarted it immediately.
Edited by toralf