aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/puppet/files/puppet.in
blob: 7ffa33d404046b54264956019242874c5e48761a (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
29
30
31
32
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: puppet
# REQUIRE: NETWORK

#
# Add the following lines to /etc/rc.conf to enable the puppet agent:
#
# puppet_enable="YES"

. /etc/rc.subr

name="puppet"
rcvar=`set_rcvar`

load_rc_config "$name"

: ${puppet_enable="NO"}
: ${puppet_rundir="%%PUPPET_RUNDIR%%"}
: ${puppet_flags="--rundir=${puppet_rundir}"}

command_interpreter="%%PREFIX%%/bin/ruby18"
command="%%PREFIX%%/bin/puppet"
command_args="agent ${puppet_flags}"
unset puppet_flags

pidfile="${puppet_rundir}/agent.pid"

run_rc_command "$1"