#!/sbin/openrc-run extra_started_commands="reload" supervisor="supervise-daemon" agent_name=${SVCNAME#pgmon.} agent_name=${agent_name:-pgmon} PGMON_USER="${PGMON_USER:-postgres}" PGMON_GROUP="${PGMON_GROUP:-$PGMON_USER}" CONFIG_FILE="/etc/pgmon/${agent_name}.yml" output_log=/var/log/pgmon/${SVCNAME}.log error_log=/var/log/pgmon/${SVCNAME}.err start_pre() { checkpath -f -m 0644 -o "${PGMON_USER}:${PGMON_GROUP}" "${output_log}" "${error_log}" } command="/usr/bin/pgmon" command_args="-c '$CONFIG_FILE'" command_background="true" command_user="${PGMON_USER}:${PGMON_GROUP}"