apkbuilds @ e89c3ae528d667a63b9716653f9f926bf416f2ee

 1#!/sbin/openrc-run
 2supervisor=supervise-daemon
 3
 4command="/usr/bin/postgres_exporter"
 5command_args="$ARGS"
 6command_background="yes"
 7command_user="prometheus:prometheus"
 8
 9export DATA_SOURCE_NAME
10logdir="/var/log/prometheus"
11error_log="$logdir/${SVCNAME}.log"
12pidfile="/var/run/${SVCNAME}.pid"
13
14depend() {
15	need net
16	after firewall
17}
18
19start_pre() {
20	checkpath -d -o $command_user -m755 $logdir
21	checkpath -f -o $command_user -m644 $error_log
22}