summaryrefslogtreecommitdiff
path: root/sysutils/puppet/files/puppetd.sh
blob: e06571994af19f5f2b0b4383b83cc8f95f4a23f2 (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
27
28
29
30
31
32
33
34
35
36
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: puppetd.sh,v 1.2 2008/04/04 15:20:48 jlam Exp $
#
# PROVIDE: puppetd
# REQUIRE: DAEMON
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable puppetd:
#
# puppetd="YES"
# puppetd_confdir="@PKG_SYSCONFDIR@"
# puppetd_pid="/var/run/${name}.pid"
# puppetd_flags="--confdir $puppetd_confdir --rundir /var/run"

if [ -f /etc/rc.subr ]; then
	. /etc/rc.subr
fi

name="puppetd"
rcvar=$name
command="@PREFIX@/bin/${name}"
command_interpreter="@RUBY@"
: ${puppetd_confdir="@PKG_SYSCONFDIR@"}
: ${puppetd_pid="/var/run/${name}.pid"}
: ${puppetd_flags="--confdir $puppetd_confdir --rundir /var/run"}

pidfile="$puppetd_pid"

if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
	load_rc_config $name
elif [ -f /etc/rc.conf ]; then
	. /etc/rc.conf
fi

run_rc_command "$1"