summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdares2015-08-07 15:51:01 +0200
committerIdares2015-08-07 15:51:01 +0200
commitec2f44c2edebf76f7e8d92fae9708616b9a9078d (patch)
tree3ab2b283053165696aa3479deb87a397b2bbf136
downloadaur-ec2f44c2edebf76f7e8d92fae9708616b9a9078d.tar.gz
Initial import.
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD58
-rw-r--r--zabbix-agent.install20
-rw-r--r--zabbix-agentd.service13
-rw-r--r--zabbix-agentd.tmpfiles1
5 files changed, 118 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..20adc0ea76b3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = zabbix-agent
+ pkgdesc = Software designed for monitoring availability and performance of IT infrastructure components
+ pkgver = 2.4.5
+ pkgrel = 1
+ url = http://www.zabbix.com
+ install = zabbix-agent.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ backup = etc/zabbix/zabbix_agent.conf
+ backup = etc/zabbix/zabbix_agentd.conf
+ source = http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz
+ source = zabbix-agent.install
+ source = zabbix-agentd.service
+ source = zabbix-agentd.tmpfiles
+ md5sums = a82eb0d55d3ca947e10a4a55238f4388
+ md5sums = 519372592b66392255bfbf24e9469748
+ md5sums = d7ef5c8a7a6352dabecb9105da63fc84
+ md5sums = 9ce692356b4ac0a71595ce55fe3b44c1
+ sha1sums = 4e5ed20341b7178a032fc131960eafd7683610f0
+ sha1sums = dcd2331be84f7b795087c8427f5c92837f2cf4ff
+ sha1sums = acfe6a783cad8f28e7f23a65189af9a7d22bb540
+ sha1sums = 8926befcb944732fd59a34c89b569d3fbef1ca9d
+
+pkgname = zabbix-agent
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c688cf0c5543
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: 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
+pkgver=2.4.5
+pkgrel=1
+pkgdesc="Software designed for monitoring availability and performance of IT infrastructure components"
+arch=('i686' 'x86_64')
+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"
+ )
+
+build() {
+ cd $srcdir/zabbix-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc/zabbix \
+ --with-libcurl \
+ --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
+}
+
+md5sums=('a82eb0d55d3ca947e10a4a55238f4388'
+ '519372592b66392255bfbf24e9469748'
+ 'd7ef5c8a7a6352dabecb9105da63fc84'
+ '9ce692356b4ac0a71595ce55fe3b44c1')
+sha1sums=('4e5ed20341b7178a032fc131960eafd7683610f0'
+ 'dcd2331be84f7b795087c8427f5c92837f2cf4ff'
+ 'acfe6a783cad8f28e7f23a65189af9a7d22bb540'
+ '8926befcb944732fd59a34c89b569d3fbef1ca9d')
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 -