aboutsummaryrefslogtreecommitdiff
path: root/apks/prometheus-postgres-exporter/postgres-exporter.initd
blob: 8955c15c542f26c706400b6d86a27950cfc18e0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
}