diff options
author | Philipp Born | 2018-01-08 20:57:25 +0100 |
---|---|---|
committer | Philipp Born | 2018-01-08 20:57:25 +0100 |
commit | 832267ab0b06c6fab89a0465f3ccbc7901282518 (patch) | |
tree | 26fc9485448c93719dc885aea5c2220895007e23 | |
download | aur-832267ab0b06c6fab89a0465f3ccbc7901282518.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | zabbix-agent.install | 20 | ||||
-rw-r--r-- | zabbix-agentd.service | 13 | ||||
-rw-r--r-- | zabbix-agentd.tmpfiles | 1 |
5 files changed, 126 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..381724948ecb --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +# Generated by mksrcinfo v8 +# Mon Jan 8 19:57:21 UTC 2018 +pkgbase = zabbix-agent-lts + pkgdesc = Software designed for monitoring availability and performance of IT infrastructure components + pkgver = 3.0.14 + pkgrel = 1 + url = http://www.zabbix.com + install = zabbix-agent.install + arch = i686 + arch = x86_64 + arch = armv6h + arch = armv7h + license = GPL + provides = zabbix-agent + conflicts = zabbix-agent + replaces = zabbix-agent + backup = etc/zabbix/zabbix_agent.conf + backup = etc/zabbix/zabbix_agentd.conf + source = http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.14/zabbix-3.0.14.tar.gz + source = zabbix-agent.install + source = zabbix-agentd.service + source = zabbix-agentd.tmpfiles + sha512sums = b024de610b86bd45fc0be655e8275daf53b1de813e13a1e78cfad149b1191a7f118862646f5ded43938bc489ff0b0f325de36d4b2c076ce6fe768ee4234eb944 + sha512sums = 2a918643877e102a1e7055b423efa800ab45c5566b0329bddeeae019aed8d8cd3989b7303640e5d28b37c49e612a4287ab7f8745771dd7ebcaac2f1abf2e0645 + sha512sums = 95cb6edb45e8dd45120657bb2a9fef1b3fca3950059820deb7cb5b55efd0ff00ef08f2da539c6ceed98f80421b77fa35079ccb1673d21c7bec94f78e7f111359 + sha512sums = 3c63a2791e6ac77cb3144eb47a275cc8748f5c8943a076052300d6964994b95b18d60f504584fdcb683739dc514261402895e3f30ae2fbdb218acbc42c3d72df + +pkgname = zabbix-agent-lts + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..cdad67159de5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Philipp 'TamCore' B. <philipp {at} tamcore {dot} eu> +# Contributor: Idares <idares at seznam dot cz> +# Contributor: Enrico Morelli <morelli@cerm.unifi.it> +# Contributor: Vadym Abramchuk <abramm@gmail.com> +# Contributor: karol_007 <karol.blazewicz@gmail.com> + +pkgname=zabbix-agent-lts +pkgver=3.0.14 +pkgrel=1 +pkgdesc="Software designed for monitoring availability and performance of IT infrastructure components" +arch=('i686' 'x86_64' 'armv6h' 'armv7h') +url="http://www.zabbix.com" +license=('GPL') +backup=('etc/zabbix/zabbix_agent.conf' + 'etc/zabbix/zabbix_agentd.conf' + ) +install="zabbix-agent.install" +source=("http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/$pkgver/zabbix-$pkgver.tar.gz" + "zabbix-agent.install" + "zabbix-agentd.service" + "zabbix-agentd.tmpfiles" + ) +provides=(zabbix-agent) +replaces=(zabbix-agent) +conflicts=(zabbix-agent) + +sha512sums=('b024de610b86bd45fc0be655e8275daf53b1de813e13a1e78cfad149b1191a7f118862646f5ded43938bc489ff0b0f325de36d4b2c076ce6fe768ee4234eb944' + '2a918643877e102a1e7055b423efa800ab45c5566b0329bddeeae019aed8d8cd3989b7303640e5d28b37c49e612a4287ab7f8745771dd7ebcaac2f1abf2e0645' + '95cb6edb45e8dd45120657bb2a9fef1b3fca3950059820deb7cb5b55efd0ff00ef08f2da539c6ceed98f80421b77fa35079ccb1673d21c7bec94f78e7f111359' + '3c63a2791e6ac77cb3144eb47a275cc8748f5c8943a076052300d6964994b95b18d60f504584fdcb683739dc514261402895e3f30ae2fbdb218acbc42c3d72df') + + +build() { + cd $srcdir/zabbix-$pkgver + ./configure \ + --prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/bin \ + --sysconfdir=/etc/zabbix \ + --enable-ipv6 \ + --with-libcurl \ + --with-openssl \ + --enable-agent + make +} + +package() { + cd $srcdir/zabbix-$pkgver + make DESTDIR=$pkgdir install + + install -d -m0750 $pkgdir/var/log/zabbix + + install -D -m0644 $srcdir/zabbix-agentd.service $pkgdir/usr/lib/systemd/system/zabbix-agentd.service + + # change pid file location + sed -i 's:# PidFile=.*:PidFile=/run/zabbix/zabbix_agentd.pid:' $pkgdir/etc/zabbix/zabbix_agentd.conf + # change log file location + sed -i 's:^LogFile=.*:LogFile=/var/log/zabbix/zabbix_agentd.log:' $pkgdir/etc/zabbix/zabbix_agentd.conf + + # tmpfile + install -D -m 0644 $srcdir/zabbix-agentd.tmpfiles $pkgdir/usr/lib/tmpfiles.d/zabbix-agentd.conf +} + diff --git a/zabbix-agent.install b/zabbix-agent.install new file mode 100644 index 000000000000..c1de09b8aabe --- /dev/null +++ b/zabbix-agent.install @@ -0,0 +1,20 @@ +post_install() { + getent group zabbix > /dev/null || groupadd -r zabbix > /dev/null + getent passwd zabbix > /dev/null || useradd -r -g zabbix -d /dev/null zabbix -m > /dev/null + chown -R zabbix:zabbix /var/log/zabbix /etc/zabbix + systemd-tmpfiles --create zabbix-agentd.conf + + + grep -e '^zabbix-agent.*10050/tcp' /etc/services > /dev/null || echo "zabbix-agent 10050/tcp Zabbix Agent" >> /etc/services + grep -e '^zabbix-agent.*10050/udp' /etc/services > /dev/null || echo "zabbix-agent 10050/udp Zabbix Agent" >> /etc/services + grep -e '^zabbix-trapper.*10051/tcp' /etc/services > /dev/null || echo "zabbix-trapper 10051/tcp Zabbix Trapper" >> /etc/services + grep -e '^zabbix-trapper.*10051/udp' /etc/services > /dev/null || echo "zabbix-trapper 10051/udp Zabbix Trapper" >> /etc/services +} + +post_upgrade() { + systemd-tmpfiles --create zabbix-agentd.conf +} + +post_remove() { + userdel zabbix +} diff --git a/zabbix-agentd.service b/zabbix-agentd.service new file mode 100644 index 000000000000..eee8bf933c8f --- /dev/null +++ b/zabbix-agentd.service @@ -0,0 +1,13 @@ +[Unit] +Description=Zabbix agent daemon +After=network.target + +[Service] +Type=forking +User=root +ExecStart=/usr/bin/zabbix_agentd +PIDFile=/run/zabbix/zabbix_agentd.pid + +[Install] +WantedBy=multi-user.target + diff --git a/zabbix-agentd.tmpfiles b/zabbix-agentd.tmpfiles new file mode 100644 index 000000000000..56471bb42c0a --- /dev/null +++ b/zabbix-agentd.tmpfiles @@ -0,0 +1 @@ +d /run/zabbix 0755 zabbix zabbix - |