mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-21 05:31:25 +02:00
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.
13 lines
365 B
Plaintext
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
|
|
}
|