1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00
freebsd-ports/sysutils/puppet5/files/puppet.in
Romain Tartière 2c2eff30c6 New port sysutils/puppet5
Copy sysutils/puppet4 to sysutils/puppet5 and update.

With this update, we switched the default facter implementation from ruby
(sysutils/rubygem-facter) to C++ (sysutils/facter).  The legacy implementation
can still be chosen with options.

With hat:	puppet
2017-08-12 13:53:05 +00:00

50 lines
790 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: puppet
# REQUIRE: LOGIN
# 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%/*}"
PATH="${PATH}:/usr/local/bin"
# An UTF-8 locale is required
: LC_ALL=${LC_ALL:=C.UTF-8}
case $LC_ALL in
*.UTF-8)
;;
*.*)
LC_ALL="${LC_ALL%.*}.UTF-8"
;;
*)
LC_ALL=C.UTF-8
;;
esac
export LC_ALL
run_rc_command "$1"