Public bug reported:

/etc/logrotate.d/zabbix-agent has the following postrotate line:

[ -e /var/run/zabbix/zabbix_agentd.pid ] && invoke-rc.d zabbix-agent
force-reload >/dev/null

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/zabbix/zabbix_agentd.pid ] && systemctl restart zabbix-
agent

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.

** Affects: zabbix (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: cron logrotate systemd

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1772995

Title:
  /etc/logrotate.d/zabbix-agent uses invoke-rc.d command, not in cron
  path

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zabbix/+bug/1772995/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to