diff --git a/conf/redhat/server.init b/conf/redhat/server.init index 0b82c6c6f..5e42c387f 100644 --- a/conf/redhat/server.init +++ b/conf/redhat/server.init @@ -1,90 +1,87 @@ #!/bin/bash # puppetmaster This shell script enables the puppetmaster server. # # Author: Duane Griffin # # chkconfig: - 65 45 # # description: Server for the puppet system management tool. # processname: puppetmaster PATH=/usr/bin:/sbin:/bin:/usr/sbin export PATH lockfile=/var/lock/subsys/puppetmaster # Source function library. . /etc/rc.d/init.d/functions if [ -f /etc/sysconfig/puppetmaster ]; then . /etc/sysconfig/puppetmaster fi [ -z "$PUPPETMASTER_MANIFEST" ] && PUPPETMASTER_MANIFEST=/etc/puppet/manifests/site.pp [ -z "$PUPPETMASTER_LOG" ] && PUPPETMASTER_LOG="/var/log/puppet/puppetmaster.log" PUPPETMASTER_OPTS=" --manifest=$PUPPETMASTER_MANIFEST \ --logdest=${PUPPETMASTER_LOG} \ ${PUPPETMASTER_EXTRA_OPTS}" RETVAL=0 prog=puppetmasterd PUPPETMASTER=/usr/sbin/$prog start() { echo -n $"Starting puppetmaster: " # Confirm the manifest exists if [ -r $PUPPETMASTER_MANIFEST ]; then daemon $PUPPETMASTER $PUPPETMASTER_OPTS RETVAL=$? else failure $"Manifest does not exist: $PUPPETMASTER_MANIFEST" echo return 1 fi [ $RETVAL -eq 0 ] && touch "$lockfile" echo return $RETVAL } stop() { echo -n $"Stopping puppetmaster: " killproc $PUPPETMASTER RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f "$lockfile" return $RETVAL } restart() { - echo -n $"Restarting puppet: " - killproc $PUPPETMASTER -HUP - RETVAL=$? - echo - return $RETVAL + stop + start } case "$1" in start) start ;; stop) stop ;; restart|reload|force-reload) - restart + restart ;; condrestart) [ -f "$lockfile" ] && restart ;; status) status $PUPPETMASTER ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" exit 1 esac exit $RETVAL