diff options
author | rhatto <rhatto@18ef50b8-d735-4ccd-97c1-689132df3dd9> | 2009-06-29 00:51:22 +0000 |
---|---|---|
committer | rhatto <rhatto@18ef50b8-d735-4ccd-97c1-689132df3dd9> | 2009-06-29 00:51:22 +0000 |
commit | 0e4c3b1a44c3b50cb801acd2d3e880f3b4207bed (patch) | |
tree | f69132a5d62479f124d3e8166b56ad0f2da34ccf /app/admin/puppet/rc.puppetmaster.new | |
parent | 4a06799f874eab61888cd138a5934a602a407c3b (diff) | |
download | mkbuilds-0e4c3b1a44c3b50cb801acd2d3e880f3b4207bed.tar.gz mkbuilds-0e4c3b1a44c3b50cb801acd2d3e880f3b4207bed.tar.bz2 |
puppet: adding initscript ; openrc: addin openrc
git-svn-id: svn+slack://slack.fluxo.info/var/svn/mkbuilds@491 18ef50b8-d735-4ccd-97c1-689132df3dd9
Diffstat (limited to 'app/admin/puppet/rc.puppetmaster.new')
-rw-r--r-- | app/admin/puppet/rc.puppetmaster.new | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/app/admin/puppet/rc.puppetmaster.new b/app/admin/puppet/rc.puppetmaster.new new file mode 100644 index 0000000..1217fbc --- /dev/null +++ b/app/admin/puppet/rc.puppetmaster.new @@ -0,0 +1,36 @@ +#!/bin/sh + +puppetmaster_start() { + echo "Starting puppetmaster" + start-stop-daemon --start --quiet \ + --pidfile "/var/run/puppetmasterd.pid" \ + --exec /usr/bin/puppetmasterd + if [ "$?" != "0" ]; then + echo "Failed to start puppetmaster" + fi +} + +puppetmaster_stop() { + echo "Stopping puppetmaster" + start-stop-daemon --stop --quiet \ + --pidfile "/var/run/puppet/puppetmasterd.pid" + if [ "$?" != "0" ]; then + echo "Failed to stop puppetmaster" + fi + rm -f "/var/run/puppet/puppetmasterd.pid" +} + +case "$1" in +'start') + puppetmaster_start + ;; +'stop') + puppetmaster_stop + ;; +'restart') + puppetmaster_stop + puppetmaster_start + ;; +*) + echo "usage $0 start|stop|restart" +esac |