apache2 with broken logrotate config (incl Fix)
This bug report was marked for expiration 0 days ago. (find out why)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Apache2 in Package:
ii apache2 2.4.58-1ubuntu8.1 amd64 Apache HTTP Server
contains a broken logrotate Config.
Output of Systemd -> Logrotate:
```
Jul 02 00:00:00 mysys systemd[1]: Starting logrotate.service - Rotate log files...
Jul 02 00:00:00 mysys logrotate[1043990]: logrotate_script: 2: rotate: not found
Jul 02 00:00:00 mysys logrotate[1043990]: logrotate_script: 4: Syntax error: "fi" unexpected
Jul 02 00:00:00 mysys logrotate[1043953]: error: error running shared prerotate script for '/var/log/
Jul 02 00:00:00 mysys systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
Jul 02 00:00:00 mysys systemd[1]: logrotate.service: Failed with result 'exit-code'.
Jul 02 00:00:00 mysys systemd[1]: Failed to start logrotate.service - Rotate log files.
```
Broken part:
```
...
prerotate
rotate 356
fi
endscript
```
I Think the following Line is missung above the run-parts
```
if [ -d /etc/logrotate.
```
Ubuntu 24.04 LTS is affected