Package: zabbix-agent
Version: 1:1.8.2-1squeeze2
Severity: normal

start-stop-daemon is used in /etc/init.d/zabbix-agent to start and stop the 
daemon. Without --pidfile option, it behaves similar to killall, so it 
kills also daemons in LXC.

To solve the problem, I've just added the --pidfile option for stop action. The 
new script is attached.

-- System Information:
Debian Release: 6.0.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-vserver-686 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages zabbix-agent depends on:
ii  adduser                 3.112+nmu2       add and remove users and groups
ii  debconf [debconf-2.0]   1.5.36.1         Debian configuration management sy
ii  libc6                   2.11.3-3         Embedded GNU C Library: Shared lib
ii  libldap-2.4-2           2.4.23-7.2       OpenLDAP libraries
ii  libopenipmi0            2.0.16-1.2       Intelligent Platform Management In
ii  lsb-base                3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip
ii  ucf                     3.0025+nmu1      Update Configuration File: preserv

zabbix-agent recommends no packages.

Versions of packages zabbix-agent suggests:
ii  logrotate                     3.7.8-6    Log rotation utility

-- Configuration Files:
/etc/init.d/zabbix-agent changed:
set -e
NAME=zabbix_agentd
DAEMON=/usr/sbin/$NAME
DESC="Zabbix agent"
test -x $DAEMON || exit 0
DIR=/var/run/zabbix-agent
PID=$DIR/$NAME.pid
RETRY=15
if test ! -d "$DIR"; then
  mkdir "$DIR"
  chown -R zabbix:zabbix "$DIR"
fi
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
. /lib/lsb/init-functions
case "$1" in
  start)
    log_daemon_msg "Starting $DESC" "$NAME"
        start-stop-daemon --oknodo --start --pidfile $PID \
          --exec $DAEMON >/dev/null 2>&1
    case "$?" in
        0) log_end_msg 0 ;;
        *) log_end_msg 1; exit 1 ;;
    esac
        ;;
  stop)
    log_daemon_msg "Stopping $DESC" "$NAME"
        start-stop-daemon --oknodo --stop --pidfile $PID \
          --exec $DAEMON --retry $RETRY
    case "$?" in
        0) log_end_msg 0 ;;
        *) log_end_msg 1; exit 1 ;;
    esac
        ;;
  status)
   ls -l /proc/`cat $PID`/exe &> /dev/null
   if [ $? -eq 0 ]; then
       echo "$DESC is running"
       exit 0
   else
       echo "$DESC is NOT running"
       exit 1
   fi
   ;;
  restart|force-reload)
        $0 stop
        $0 start
        ;;
  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac
exit 0


-- debconf information:
  zabbix-agent/server:



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to