ports/sysutils/puppet/files/puppet.in
Steve Wills cdc55ad872 - Update to 3.0.2
- Fix config generation
- Specify rundir, logdir, vardir explicitly to avoid potential issues
- Fix command_interpreter in rc script [1]
- General improvements to rc script while here [2]

PR:		ports/174557 [1]
Reviewed by:	crees [1] [2]
2013-01-06 16:26:53 +00:00

33 lines
581 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: puppet
# REQUIRE: NETWORK
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable the puppet agent:
#
# puppet_enable="YES"
. /etc/rc.subr
name="puppet"
rcvar=puppet_enable
load_rc_config "$name"
: ${puppet_enable="NO"}
: ${puppet_rundir="/var/run/puppet"}
command="%%PREFIX%%/bin/puppet"
command_args="agent ${puppet_flags} --rundir=${puppet_rundir}"
command_interpreter=%%RUBY%%
unset puppet_flags
pidfile="${puppet_rundir}/agent.pid"
start_precmd="install -d -o puppet -g puppet ${pidfile%/*}"
run_rc_command "$1"