2024-06-03 05:13:17 +00:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
|
|
extra_started_commands="reload"
|
|
|
|
|
|
|
|
|
|
agent_name=${RC_SERVICE#pgmon.}
|
|
|
|
|
agent_name=${agent_name:-pgmon}
|
|
|
|
|
|
2024-06-06 03:23:34 +00:00
|
|
|
command="/usr/bin/pgmon"
|
2024-06-03 05:13:17 +00:00
|
|
|
command_args="--server --config /etc/pgmon/${agent_name}.cfg"
|
|
|
|
|
command_user="zabbix:zabbix"
|
|
|
|
|
|
|
|
|
|
pidfile="/run/pgmon/${agent_name}.pid"
|
|
|
|
|
|
|
|
|
|
start_pre() {
|
|
|
|
|
checkpath -d -m 0755 -o "${command_user}" "/run/pgmon"
|
|
|
|
|
checkpath -d -m 0755 -o "${command_user}" "/var/log/pgmon"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
reload() {
|
|
|
|
|
ebegin "Reloading ${RC_SVCNAME}"
|
|
|
|
|
start-stop-daemon --signal HUP --pidfile "${pidfile}"
|
|
|
|
|
eend $?
|
|
|
|
|
}
|