aports/community/zabbix/zabbix-agent2.initd
Kevin Daudt a78463bb51 community/zabbix: fix permissions on existing log files
Now that the service runs as zabbix, the service will fail to run if the
log files are still owned by root. Fix the permissions when starting the
service.
2022-01-02 11:18:07 +00:00

13 lines
365 B
Plaintext

#!/sbin/openrc-run
command=/usr/sbin/zabbix_agent2
supervisor="supervise-daemon"
command_user="zabbix:zabbix"
start_pre() {
checkpath --directory --owner zabbix:zabbix /var/log/zabbix
# fix log files created as root
checkpath --file --owner zabbix:zabbix /var/log/zabbix/zabbix_agent2.log
checkpath --directory --owner zabbix:zabbix /run/zabbix
}