#!/sbin/openrc-run # Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 description="A Prometheus exporter that mines /proc to report on selected processes" : ${PROCESS_EXPORTER_USER:=process-exporter} : ${PROCESS_EXPORTER_LOG:="/var/log/process-exporter/process-exporter.log"} : ${SSD_OPTS:="-1 ${PROCESS_EXPORTER_LOG} -2 ${PROCESS_EXPORTER_LOG}"} name="${PROCESS_EXPORTER_NAME:-"Process Exporter"}" command="/usr/bin/process-exporter" command_args="${PROCESS_EXPORTER_OPTS}" command_user="${PROCESS_EXPORTER_USER}" command_background=true pidfile="/run/${RC_SVCNAME}.pid" start_stop_daemon_args="${SSD_OPTS}" depend() { need net } start_pre() { checkpath -d -m 0750 -o ${PROCESS_EXPORTER_USER} \ "${PROCESS_EXPORTER_LOG%/*}" }