Package logrotate script

This commit is contained in:
James Campbell 2025-01-15 01:34:04 -05:00
parent ab7381f0ca
commit 0cd1fe0148
Signed by: james
GPG Key ID: 2287C33A40DC906A
6 changed files with 10 additions and 4 deletions

View File

@ -15,7 +15,7 @@ SLOT="0"
KEYWORDS="amd64"
EGIT_REPO_URI="https://code2.shh-dot-com.org/james/pgmon.git"
#EGIT_COMMIT=""
EGIT_COMMIT="v1.0.0"
DEPEND="
${PYTHON_DEPS}

View File

@ -69,6 +69,9 @@ install:
# Install systemd unit files
cp systemd/* $(DESTDIR)/lib/systemd/system/
# Install logrotate config
cp logrotate/${PACKAGE_NAME}.logrotate ${DESTDIR}/etc/logrotate.d/${PACKAGE_NAME}
install-tests: debian-install-test rocky-install-test ubuntu-install-test

View File

@ -22,13 +22,14 @@ A bridge to sit between monitoring tools and PostgreSQL
make -C /src install DESTDIR=%{buildroot}
%files
/usr/local/bin/pgmon
/usr/share/man/man1/pgmon.1.gz
/etc/logrotate.d/pgmon
/etc/pgmon/pgmon.yml
/etc/pgmon/pgmon-metrics.yml
/etc/pgmon/pgmon-service.conf
/lib/systemd/system/pgmon.service
/lib/systemd/system/pgmon@.service
/usr/local/bin/pgmon
/usr/share/man/man1/pgmon.1.gz
%post
mkdir -p -m 0755 /var/log/pgmon

View File

@ -7,9 +7,11 @@ 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"
command="/usr/bin/pgmon"
command_args="'$CONFIG_FILE'"
command_background="true"
command_user="zabbix:zabbix"
command_user="${PGMON_USER}:${PGMON_GROUP}"