35 lines
859 B
Bash
Executable File
35 lines
859 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: prometheus_poudriere
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
# prometheus_poudriere_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable prometheus_poudriere.
|
|
# prometheus_poudriere_args (string): CLI arguments for prometheus_poudriere executable.
|
|
# Set to "" by default.
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=prometheus_poudriere
|
|
rcvar=prometheus_poudriere_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${prometheus_poudriere_enable:="NO"}
|
|
: ${prometheus_poudriere_args:=""}
|
|
|
|
pidfile=/var/run/${name}.pid
|
|
command="/usr/sbin/daemon"
|
|
procname=%%PREFIX%%/bin/${name}
|
|
command_args="-f -p ${pidfile} -T ${name} \
|
|
/usr/bin/env ${procname} \
|
|
${prometheus_poudriere_args}"
|
|
|
|
run_rc_command "$1"
|