diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2022-12-12 22:07:14 +0100 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2022-12-12 22:12:00 +0100 |
commit | eed21034efae03ee661e06122f96dc01e53afaa4 (patch) | |
tree | 77d08583f538a9f87bc1a34e6fe29c3e2f3fd13a /apks/prometheus-postgres-exporter/postgres-exporter.initd | |
parent | ae0a676dd82ad2c842437ee3cd36526f4951f998 (diff) | |
download | apkbuilds-eed21034efae03ee661e06122f96dc01e53afaa4.tar.gz apkbuilds-eed21034efae03ee661e06122f96dc01e53afaa4.tar.bz2 apkbuilds-eed21034efae03ee661e06122f96dc01e53afaa4.zip |
feat: Add prometheus-postgres-exporter
Diffstat (limited to 'apks/prometheus-postgres-exporter/postgres-exporter.initd')
-rwxr-xr-x | apks/prometheus-postgres-exporter/postgres-exporter.initd | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/apks/prometheus-postgres-exporter/postgres-exporter.initd b/apks/prometheus-postgres-exporter/postgres-exporter.initd new file mode 100755 index 0000000..8955c15 --- /dev/null +++ b/apks/prometheus-postgres-exporter/postgres-exporter.initd @@ -0,0 +1,22 @@ +#!/sbin/openrc-run +supervisor=supervise-daemon + +command="/usr/bin/postgres_exporter" +command_args="$ARGS" +command_background="yes" +command_user="prometheus:prometheus" + +export DATA_SOURCE_NAME +logdir="/var/log/prometheus" +error_log="$logdir/${SVCNAME}.log" +pidfile="/var/run/${SVCNAME}.pid" + +depend() { + need net + after firewall +} + +start_pre() { + checkpath -d -o $command_user -m755 $logdir + checkpath -f -o $command_user -m644 $error_log +} |