Public bug reported:
Binary package hint: tor
Whenever logrotate runs while tor is not running, logrotate delivers the
following error message to my mailbox:
/etc/cron.daily/logrotate:
There is no /var/run/tor directory.
error: error running shared postrotate script for /var/log/tor/*log
run-parts: /etc/cron.daily/logrotate exited with return code 1
This is because /etc/logrotate.d/tor includes the following:
postrotate
/etc/init.d/tor reload > /dev/null
endscript
And /etc/init.d/tor executes the following when called with "reload" as
argument:
if test ! -d $TORPIDDIR; then echo "There is no $TORPIDDIR directory."
>&2; exit 1
($TORPIDDIR is /var/run/tor.)
This behaviour is a bit annoying, as I use tor only occasionally and don't
often have it running, which means that I get an error message almost every
day. I am not sure whether this should be fixed in /etc/logrotate.d/tor or in
/etc/init.d/tor. What is the correct behaviour for an init script if it is
called with the "reload" argument when the daemon is not running? Should it
output an error message or fail silently?
In the former case, /etc/logrotate.d/tor might be fixed by changing the above
lines to:
postrotate
/etc/init.d/tor reload > /dev/null 2> /dev/null
endscript
This will redirect standard error to /dev/null as well, so that the
error message no longer reaches logrotate.
I am using feisty with tor 0.1.1.26-1.
** Affects: tor (Ubuntu)
Importance: Undecided
Status: New
--
error when logrotate runs while tor is not running
https://bugs.launchpad.net/bugs/139956
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs