Package logrotate script
This commit is contained in:
parent
ab7381f0ca
commit
0cd1fe0148
@ -15,7 +15,7 @@ SLOT="0"
|
|||||||
KEYWORDS="amd64"
|
KEYWORDS="amd64"
|
||||||
|
|
||||||
EGIT_REPO_URI="https://code2.shh-dot-com.org/james/pgmon.git"
|
EGIT_REPO_URI="https://code2.shh-dot-com.org/james/pgmon.git"
|
||||||
#EGIT_COMMIT=""
|
EGIT_COMMIT="v1.0.0"
|
||||||
|
|
||||||
DEPEND="
|
DEPEND="
|
||||||
${PYTHON_DEPS}
|
${PYTHON_DEPS}
|
||||||
3
Makefile
3
Makefile
@ -70,6 +70,9 @@ install:
|
|||||||
# Install systemd unit files
|
# Install systemd unit files
|
||||||
cp systemd/* $(DESTDIR)/lib/systemd/system/
|
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
|
install-tests: debian-install-test rocky-install-test ubuntu-install-test
|
||||||
|
|
||||||
debian-install-test:
|
debian-install-test:
|
||||||
|
|||||||
@ -22,13 +22,14 @@ A bridge to sit between monitoring tools and PostgreSQL
|
|||||||
make -C /src install DESTDIR=%{buildroot}
|
make -C /src install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
/usr/local/bin/pgmon
|
/etc/logrotate.d/pgmon
|
||||||
/usr/share/man/man1/pgmon.1.gz
|
|
||||||
/etc/pgmon/pgmon.yml
|
/etc/pgmon/pgmon.yml
|
||||||
/etc/pgmon/pgmon-metrics.yml
|
/etc/pgmon/pgmon-metrics.yml
|
||||||
/etc/pgmon/pgmon-service.conf
|
/etc/pgmon/pgmon-service.conf
|
||||||
/lib/systemd/system/pgmon.service
|
/lib/systemd/system/pgmon.service
|
||||||
/lib/systemd/system/pgmon@.service
|
/lib/systemd/system/pgmon@.service
|
||||||
|
/usr/local/bin/pgmon
|
||||||
|
/usr/share/man/man1/pgmon.1.gz
|
||||||
|
|
||||||
%post
|
%post
|
||||||
mkdir -p -m 0755 /var/log/pgmon
|
mkdir -p -m 0755 /var/log/pgmon
|
||||||
|
|||||||
@ -7,9 +7,11 @@ supervisor="supervise-daemon"
|
|||||||
agent_name=${SVCNAME#pgmon.}
|
agent_name=${SVCNAME#pgmon.}
|
||||||
agent_name=${agent_name:-pgmon}
|
agent_name=${agent_name:-pgmon}
|
||||||
|
|
||||||
|
PGMON_USER="${PGMON_USER:-postgres}"
|
||||||
|
PGMON_GROUP="${PGMON_GROUP:-$PGMON_USER}"
|
||||||
CONFIG_FILE="/etc/pgmon/${agent_name}.yml"
|
CONFIG_FILE="/etc/pgmon/${agent_name}.yml"
|
||||||
|
|
||||||
command="/usr/bin/pgmon"
|
command="/usr/bin/pgmon"
|
||||||
command_args="'$CONFIG_FILE'"
|
command_args="'$CONFIG_FILE'"
|
||||||
command_background="true"
|
command_background="true"
|
||||||
command_user="zabbix:zabbix"
|
command_user="${PGMON_USER}:${PGMON_GROUP}"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user