The problem is within /etc/logrotate.d/apache2 - when /etc/apache2/envvars does not exist:
# logrotate -d /etc/logrotate.conf:
[...]
error: apache2:11 lines must begin with a keyword or a filename (possibly in double quotes)
error: apache2:12 missing end of line
reading config info for /etc/init.d/apache2 reload > /dev/null
fi
endscript
}
[...]
considering log reload
error: stat of reload failed: No such file or directory
considering log >
error: stat of > failed: No such file or directory
considering log /dev/null
log does not need rotating
considering log fi
error: stat of fi failed: No such file or directory
considering log endscript
error: stat of endscript failed: No such file or directory
considering log }
error: stat of } failed: No such file or directory
[...]
Workaround: remove /etc/logrotate.d/apache2 when not needed.
Possible Fix in apache2-common: additionally test if [ -f /etc/apache2/envvars ] before using that script in backticks.
Possible Fix in logrotate: Do not rotate non-regular files, Maybe do not try to interpret everything as a filename.
The problem is within /etc/logrotate. d/apache2 - when /etc/apache2/ envvars does not exist:
# logrotate -d /etc/logrotate. conf:
[...]
error: apache2:11 lines must begin with a keyword or a filename (possibly in double quotes)
error: apache2:12 missing end of line
reading config info for /etc/init.d/apache2 reload > /dev/null
fi
endscript
}
[...]
considering log reload
error: stat of reload failed: No such file or directory
considering log >
error: stat of > failed: No such file or directory
considering log /dev/null
log does not need rotating
considering log fi
error: stat of fi failed: No such file or directory
considering log endscript
error: stat of endscript failed: No such file or directory
considering log }
error: stat of } failed: No such file or directory
[...]
Workaround: remove /etc/logrotate. d/apache2 when not needed. envvars ] before using that script in backticks.
Possible Fix in apache2-common: additionally test if [ -f /etc/apache2/
Possible Fix in logrotate: Do not rotate non-regular files, Maybe do not try to interpret everything as a filename.