OpenVZ Forum


Home » General » Support » Stopping puppet on hn stops it in all VE
Stopping puppet on hn stops it in all VE [message #14704] Fri, 06 July 2007 16:15 Go to previous message
ugob is currently offline  ugob
Messages: 271
Registered: March 2007
Senior Member
HN: centos4
VE: centos4

[root@hn init.d]# vzctl exec 101 /etc/init.d/puppet status
puppetd (pid 5994) is running...

[root@hn init.d]# service puppet stop
Stopping puppet: [ OK ]
[root@hn init.d]# vzctl exec 101 /etc/init.d/puppet status
puppetd is stopped

Please let me know if you need more info.

Here is the puppet init script:

#!/bin/bash
# puppet        Init script for running the puppet client daemon
#
# Author:       Duane Griffin <d.griffin@psenterprise.com>
#               David Lutterkort <dlutter@redhat.com>
#
# chkconfig: - 98 02
#
# description: Enables periodic system configuration checks through puppet.
# processname: puppet
# config: /etc/sysconfig/puppet

PATH=/usr/bin:/sbin:/bin:/usr/sbin
export PATH

[ -f /etc/sysconfig/puppet ] && . /etc/sysconfig/puppet
lockfile=${LOCKFILE-/var/lock/subsys/puppet}
pidfile=${PIDFILE-/var/run/puppet.pid}
puppetd=${PUPPETD-/usr/sbin/puppetd}
RETVAL=0

# Source function library.
. /etc/rc.d/init.d/functions

PUPPET_OPTS=""
[ -n "${PUPPET_SERVER}" ] && PUPPET_OPTS="--server=${PUPPET_SERVER}"
[ -n "$PUPPET_LOG" ] && PUPPET_OPTS="${PUPPET_OPTS} --logdest=${PUPPET_LOG}"
[ -n "$PUPPET_PORT" ] && PUPPET_OPTS="${PUPPET_OPTS} --port=${PUPPET_PORT}"

# Figure out if the system just booted. Let's assume
# boot doesn't take longer than 5 minutes
## Not used for now
##[ -n "$INIT_VERSION" ] && PUPPET_OPTS="${PUPPET_OPTS} --fullrun"

start() {
        echo -n $"Starting puppet: "
        daemon $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS}
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch ${lockfile}
        return $RETVAL
}

stop() {
        echo -n $"Stopping puppet: "
        killproc $puppetd
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}

reload() {
        echo -n $"Restarting puppet: "
        killproc $puppetd -HUP
        RETVAL=$?
        echo
        return $RETVAL
}

restart() {
    stop
    start
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  reload|force-reload)
        reload
        ;;
  condrestart|try-restart)
        [ -f "$pidfile" ] && restart
        ;;
  status)
        status $puppetd
        ;;
  once)
        shift
        $puppetd -o ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} $@
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|once}"
        exit 1
esac

exit $RETVAL


Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: VE Kernel Version
Next Topic: VZDUMP Not Working
Goto Forum:
  


Current Time: Fri Jul 26 19:31:04 GMT 2024

Total time taken to generate the page: 0.03238 seconds