Improve openrc init script, add port setting

* Ensure the log directory exists with openrc

* Add a port setting to configure the port the agent listens on

* Switch to RealDictCursor

* Fix type for connection timeout
This commit is contained in:
2025-04-19 00:07:15 -04:00
parent 9b382bedaa
commit 2afeb827ed
3 changed files with 16 additions and 3 deletions

View File

@@ -11,6 +11,13 @@ 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="'$CONFIG_FILE'"
command_background="true"