diff options
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 |