summaryrefslogtreecommitdiff
path: root/net/foreman-proxy/files/foreman-proxy.in
blob: 5f4a4cee9d872f65dc5bc798debb48ffe73cac7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

# PROVIDE: foreman-proxy
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable foreman-proxy:
# foreman_proxy_enable (bool):    Set to "NO" by default
#                                 Set it to "YES" to enable nsca.
. /etc/rc.subr

name="foreman_proxy"
rcvar="foreman_proxy_enable"

command="/usr/sbin/daemon"
procname="%%PREFIX%%/sbin/smart-proxy"
command_interpreter="%%RUBY%%"
pidfile="%%FOREMAN_PROXY_RUNDIR%%/foreman-proxy.pid"
command_args="-p ${pidfile} -t ${procname} ${command_interpreter} ${procname}"

foreman_proxy_enable=${foreman_proxy_enable:-"NO"}
foreman_proxy_user=${foreman_proxy_user-"%%FOREMAN_PROXY_USER%%"}

load_rc_config "${name}"

required_files="%%PREFIX%%/etc/foreman-proxy/settings.yml"

run_rc_command "$1"