From da3b546ff3c617ae36249f0d1395bd27f9820bc6 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 10 Apr 2008 21:13:59 +0000 Subject: fixed some issues, added dependecies --- files/cluster/init.d/puppetmaster.CentOS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'files/cluster') diff --git a/files/cluster/init.d/puppetmaster.CentOS b/files/cluster/init.d/puppetmaster.CentOS index 0cb5ef9..aa8efea 100755 --- a/files/cluster/init.d/puppetmaster.CentOS +++ b/files/cluster/init.d/puppetmaster.CentOS @@ -21,6 +21,7 @@ if [ -f /etc/sysconfig/puppetmaster ]; then fi PUPPETMASTER_OPTS="" +[ -n "$PUPPETMASTER_PID_DIR" ] || PUPPETMASTER_PID_DIR="/var/run/puppet/" [ -n "$PUPPETMASTER_MANIFEST" ] && PUPPETMASTER_OPTS="--manifest=${PUPPETMASTER_MANIFEST}" [ -n "$PUPPETMASTER_PORTS" ] && PUPPETMASTER_OPTS="$PUPPETMASTER_OPTS --servertype=mongrel" [ -n "$PUPPETMASTER_LOG" ] && PUPPETMASTER_OPTS="${PUPPETMASTER_OPTS} --logdest=${PUPPETMASTER_LOG}" @@ -41,7 +42,7 @@ start() { echo -n " (port " for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do echo -n "${PUPPETMASTER_PORTS[$i]}" - daemon $PUPPETMASTER $PUPPETMASTER_OPTS --masterport=${PUPPETMASTER_PORTS[$i]} --pidfile=puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid + daemon $PUPPETMASTER $PUPPETMASTER_OPTS --masterport=${PUPPETMASTER_PORTS[$i]} --pidfile=$PUPPETMASTER_PID_DIR/puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid RETVAL=$? || $RETVAL done echo -n ")" @@ -65,7 +66,7 @@ stop() { echo -n " (port " for ((i=0; i<${#PUPPETMASTER_PORTS[@]}; i++)); do echo -n "${PUPPETMASTER_PORTS[$i]}" - killproc -p puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid $PUPPETMASTER + killproc -p $PUPPETMASTER_PID_DIR/puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid $PUPPETMASTER RETVAL=$? || $RETVAL done echo -n ")" -- cgit v1.2.3