You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
900 B

#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
if [ "${SVCNAME}" = "puppetmaster" ] ; then
PUPPETMASTER_PID="master"
else
PUPPETMASTER_PID="${SVCNAME#*.}"
fi
PUPPETMASTER_PID_DIR="${PUPPETMASTER_PID_DIR:-/var/run/puppet}"
pidfile="${PUPPETMASTER_PID_DIR}/${PUPPETMASTER_PID}.pid"
command_args="master --pidfile ${pidfile} ${PUPPETMASTER_EXTRA_OPTS}"
if [ -n "${PUPPETMASTER_PORT}" ] ; then
command_args="${command_args} --masterport ${PUPPETMASTER_PORT}"
fi
command="/usr/bin/puppet"
extra_started_commands="reload"
depend() {
need localmount net
use dns logger slapd netmount nfsmount
}
start_pre() {
checkpath --directory --owner puppet:puppet "${PUPPETMASTER_PID_DIR}"
}
reload() {
ebegin "Reloading ${SVCNAME}"
start-stop-daemon --signal HUP --pidfile "${pidfile}"
eend $? "Failed to stop ${SVCNAME}"
}