Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-2759

Debian agent startup script doesnt import defaults

XMLWordPrintable

      defaults files are not sourced in and therefore no additional commands can be run on startup and/or config options passed to the agent. This patch fixes it.

      I often do stuff like normalize hostnames and programatically work out management interfaces for the agent to bind to. The RHEL package startup script can do this, eg

      $ cat /etc/sysconfig/zabbix-agent
      ifconfig mgmt | awk '/inet /

      {gsub(/addr:/,"",$2); print "ListenIP="$2}

      ' > /etc/zabbix/agentd.conf.d/listen.conf
      conf="/etc/zabbix/agentd.conf"
      echo "Hostname="`hostname| tr 'A-Z' 'a-z'` > /etc/zabbix/agentd.conf.d/host.conf

      patch

      alienvault:/home/cscott# diff r /etc/init.d/zabbix-agent
      19,20d18
      < test -f /etc/default/$NAME && . /etc/default/$NAME
      <
      38c36
      < start-stop-daemon --oknodo --start --pidfile $PID --exec $DAEMON $OPTS >/dev/null 2>&1

      > start-stop-daemon --oknodo --start --pidfile $PID --exec $DAEMON >/dev/null 2>&1

            Unassigned Unassigned
            cscott chris scott
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: