Make tor handle rotated logs properly when Sandbox enabled
On a Debian Jessie box when logs are rotated, /var/log/tor/log is renamed to log.1, and then a fresh log file is created and tor SIGHUP'ed. (not necessarily in that order?) This works normally, but when Sandbox is enabled in torrc, tor continues to use log.1 instead of switching to the fresh log file.
I believe the important part of the configuration is just in /usr/share/tor/tor-service-defaults-torrc:
DataDirectory /var/lib/tor
PidFile /var/run/tor/tor.pid
RunAsDaemon 1
User debian-tor
ControlSocket /var/run/tor/control
ControlSocketsGroupWritable 1
CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /var/run/tor/control.authcookie
Log notice file /var/log/tor/log
torrc:
# other values stripped for brevity
Sandbox 1
Trac:
Username: alphawolf