diff options
Diffstat (limited to 'files')
-rwxr-xr-x | files/cluster/init.d/puppetmaster.CentOS | 5 |
1 files changed, 3 insertions, 2 deletions
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 ")" |