/etc/logrotate.d/zabbix-agent uses invoke-rc.d command, not in cron path
Bug #1772995 reported by
Kartik Subbarao
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zabbix (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
/etc/logrotate.
[ -e /var/run/
There are a couple of issues with this:
1) When logrotate is invoked from cron, this doesn't work since invoke-rc.d (located in /usr/sbin) isn't in the default CRON path (/usr/bin:/bin).
2) invoke-rc.d uses the old-style init.d commands instead of systemd
I'd suggest the following fix:
[ -e /var/run/
systemctl is in /bin, which is in cron's path. Also, the command doesn't seem to generate any output so the output redirection can be removed.
To post a comment you must log in.