From 34681b554d73a5f1da36e1c5f32430d7c7dca2f0 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 22 Apr 2019 19:59:50 -0400 Subject: [PATCH] prometheus: checkpath on log files --- prometheus/alertmanager/APKBUILD | 2 +- prometheus/alertmanager/alertmanager.initd | 1 + prometheus/prometheus/APKBUILD | 2 +- prometheus/prometheus/prometheus.initd | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/prometheus/alertmanager/APKBUILD b/prometheus/alertmanager/APKBUILD index 744a268..4dcd963 100644 --- a/prometheus/alertmanager/APKBUILD +++ b/prometheus/alertmanager/APKBUILD @@ -53,4 +53,4 @@ package() { sha512sums="94012739c5c9691ff34bb521e220e00de13ef866451ffaaa8d45f85c228c6b515a84550a819b351db36e3da7c17a0fa397b5b1c6a4cbc3451442f5064a0184a3 alertmanager-0.16.2.tar.gz 58f59d1972af10659a5d44f3e005b28928082bac733d27b10238196f68f361cd472782a83b60522c850de7fe9cf502f688956e6e1a2bb64c8aead10dc1529266 alertmanager.confd -e8164d4d897017dc1364497c657a2efc859105882a0222a18e63a73b3a034575e5ed3f138f8015d8d3cdd0bc209c7118241c2a2d55a5a2fde5bff77cfbe95a7f alertmanager.initd" +92da9c8cdc10ec6cbfb07ae0710b56ab66260bfa78a1f40f0e4ac498cdd50bbbb0ddec2b53d16c1492a77755bfb2382478e22e2e08f0c0e6d421bc206a99e225 alertmanager.initd" diff --git a/prometheus/alertmanager/alertmanager.initd b/prometheus/alertmanager/alertmanager.initd index 876bf1e..9a85721 100644 --- a/prometheus/alertmanager/alertmanager.initd +++ b/prometheus/alertmanager/alertmanager.initd @@ -10,6 +10,7 @@ command_user="prometheus:prometheus" pidfile="/run/${RC_SVCNAME}.pid" start_pre() { + checkpath -f "/var/log/alertmanager.initd" -m 644 -o prometheus:prometheus checkpath -f "$config_file" -m 740 -o prometheus:prometheus checkpath -d "$storage_path" -m 755 -o prometheus:prometheus } diff --git a/prometheus/prometheus/APKBUILD b/prometheus/prometheus/APKBUILD index 68cc88c..63744cc 100644 --- a/prometheus/prometheus/APKBUILD +++ b/prometheus/prometheus/APKBUILD @@ -52,4 +52,4 @@ package() { sha512sums="d9ae1078ab5b242020f00f5dfc154a75c3e1473be8f1fbecdf8f2589d55a09f8418cbf9aa189a9b2e61b4b5fca875735a26200496c02bb17793bbccbdc9f69cd prometheus-2.9.1.tar.gz 82f90ef730935b9dfc67877098ab0dcada0da941e273b241826b1e9bd2474202f2df5dd976dbed016652219cf0cfd1d77b8df72367ed1ac15c6f0cc38800cac5 prometheus.confd -2a075f2c52cdaa7378fd903898609135fc04975a0cd9ee69e963cd0416d3eaf3cf09cb023717e378b0b398b0b43d52e0d4a4b7b582f8c3d9b35189a849f132c4 prometheus.initd" +3eaf6183a3dcf39169383861eff0e15dba16cbd08673815bf936a55ef17803a283c871f1f4534a61d1d0349227122e64a1cf5dac1b10adc504107aba869fff1c prometheus.initd" diff --git a/prometheus/prometheus/prometheus.initd b/prometheus/prometheus/prometheus.initd index 902c14a..7ea45cf 100644 --- a/prometheus/prometheus/prometheus.initd +++ b/prometheus/prometheus/prometheus.initd @@ -10,6 +10,7 @@ command_user="prometheus:prometheus" pidfile="/run/${RC_SVCNAME}.pid" start_pre() { + checkpath -f "/var/log/prometheus.log" -m 644 -o prometheus:prometheus checkpath -f "$config_file" -m 740 -o prometheus:prometheus checkpath -d "$storage_path" -m 755 -o prometheus:prometheus } -- 2.45.2