diff options
author | James Turnbull <james@lovedthanlost.net> | 2008-06-17 22:10:09 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-06-17 22:10:09 +1000 |
commit | 17afb8afa0f1c3c58f2947f62938d262ae91b3c1 (patch) | |
tree | d11681661d94b27cc9d28e5c16c47629cadb2d14 /conf/gentoo/init.d/puppetmaster | |
parent | 00182ff96f18b54aa659a1909c23ba1aba253cd8 (diff) | |
download | puppet-17afb8afa0f1c3c58f2947f62938d262ae91b3c1.tar.gz puppet-17afb8afa0f1c3c58f2947f62938d262ae91b3c1.tar.xz puppet-17afb8afa0f1c3c58f2947f62938d262ae91b3c1.zip |
Fixes #1195 - Updated Gentoo init scripts
Diffstat (limited to 'conf/gentoo/init.d/puppetmaster')
-rwxr-xr-x | conf/gentoo/init.d/puppetmaster | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/conf/gentoo/init.d/puppetmaster b/conf/gentoo/init.d/puppetmaster index fcf71add4..438ac21e8 100755 --- a/conf/gentoo/init.d/puppetmaster +++ b/conf/gentoo/init.d/puppetmaster @@ -1,51 +1,51 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header$ depend() { - need net - use dns logger + need net + before puppet + use dns logger } checkconfig() { - if [[ ! -d "${PUPPETMASTER_PID_DIR}" ]] ; then - eerror "Please make sure PUPPETMASTER_PID_DIR is defined and points to a existing directory" - return 1 - fi + if [[ ! -d "${PUPPETMASTER_PID_DIR}" ]] ; then + eerror "Please make sure PUPPETMASTER_PID_DIR is defined and points to a existing directory" + return 1 + fi - local site_manifest="/etc/puppet/manifests/site.pp" - [[ -n "${PUPPETMASTER_MANIFEST}" ]] && site_manifest="${PUPPETMASTER_MANIFEST}" + local site_manifest="/etc/puppet/manifests/site.pp" + [[ -n "${PUPPETMASTER_MANIFEST}" ]] && site_manifest="${PUPPETMASTER_MANIFEST}" - if [ ! -f "${site_manifest}" ] ; then - eerror "Please create ${site_manifest} before running puppet" - return 1 - fi + if [ ! -f "${site_manifest}" ] ; then + eerror "Please create ${site_manifest} before running puppet" + return 1 + fi - return 0 + return 0 } start() { - checkconfig || return $? - - local options="" - [[ -n "${PUPPETMASTER_MANIFEST}" ]] && options="${options} --manifest=${PUPPETMASTER_MANIFEST}" - [[ -n "${PUPPETMASTER_LOG}" ]] && options="${options} --logdest=${PUPPETMASTER_LOG}" - [[ -n "${PUPPETMASTER_EXTRA_OPTS}" ]] && options="${options} ${PUPPETMASTER_EXTRA_OPTS}" - - ebegin "Starting puppetmaster" - start-stop-daemon --start --quiet \ - --pidfile ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid --exec /usr/bin/puppetmasterd \ - -- ${options} - eend $? "Failed to start puppetmaster" + checkconfig || return $? + + local options="" + [[ -n "${PUPPETMASTER_MANIFEST}" ]] && options="${options} --manifest=${PUPPETMASTER_MANIFEST}" + [[ -n "${PUPPETMASTER_LOG}" ]] && options="${options} --logdest=${PUPPETMASTER_LOG}" + [[ -n "${PUPPETMASTER_EXTRA_OPTS}" ]] && options="${options} ${PUPPETMASTER_EXTRA_OPTS}" + + ebegin "Starting puppetmaster" + start-stop-daemon --start --quiet --exec /usr/bin/ruby /usr/bin/puppetmasterd \ + -- ${options} + eend $? "Failed to start puppetmaster" } stop() { - ebegin "Stopping puppetmaster" - start-stop-daemon --stop --quiet \ - --pidfile ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid - local ret=$? - eend ${ret} "Failed to stop puppetmaster" - rm -f ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid - return ${ret} + ebegin "Stopping puppetmaster" + start-stop-daemon --stop --quiet \ + --pidfile ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid + local ret=$? + eend ${ret} "Failed to stop puppetmaster" + rm -f ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid + return ${ret} } + |