summaryrefslogtreecommitdiff
path: root/net/foreman-proxy/files/foreman-proxy.in
blob: e66423c40a20aa210f5fa6f36a68916277e71717 (plain)
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
#!/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="%%PREFIX%%/sbin/smart-proxy"
command_interpreter="%%RUBY%%"
pidfile="%%FOREMAN_PROXY_RUNDIR%%/foreman-proxy.pid"

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"