blob: 046b2aa976a00999da5b89579287627126e7a33a (
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
37
|
#!/sbin/runscript
# Copyright 1999-2013 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
pidfile="${PUPPETMASTER_PID_DIR}/${PUPPETMASTER_PID}.pid"
PUPPET_LOG_DIR="/var/log/puppet"
command_args="--pidfile ${pidfile}"
if [ -n "${PUPPETMASTER_PORT}" ] ; then
command_args="${command_args} --masterport ${PUPPETMASTER_PORT}"
fi
command_args="${command_args} ${PUPPETMASTER_EXTRA_OPTS}"
command="/usr/bin/puppetmasterd"
extra_started_commands="reload"
depend() {
need localmount net
use dns logger slapd netmount nfsmount
}
start_pre() {
checkpath --directory --owner puppet:puppet "${PUPPETMASTER_PID_DIR}"
checkpath --directory --owner puppet:puppet --mode 750 ${PUPPET_LOG_DIR}
checkpath --file --owner puppet:puppet --mode 640 "${PUPPET_LOG_DIR}/masterhttp.log"
}
reload() {
ebegin "Reloading ${SVCNAME}"
start-stop-daemon --signal HUP --pidfile "${pidfile}"
eend $? "Failed to stop ${SVCNAME}"
}
|