1 | # $Id: Portfile 71305 2010-09-08 01:38:10Z markd@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name zabbix_agentd |
---|
6 | version 1.8.6 |
---|
7 | categories net |
---|
8 | maintainers markd openmaintainer |
---|
9 | platforms darwin |
---|
10 | |
---|
11 | description An open source application and network monitor (Agent) |
---|
12 | |
---|
13 | long_description ${description} |
---|
14 | |
---|
15 | homepage http://www.zabbix.com/ |
---|
16 | master_sites sourceforge:zabbix |
---|
17 | checksums md5 4642fd263167211a73a02fe7f3bcd998 |
---|
18 | |
---|
19 | configure.args --enable-agent \ |
---|
20 | --bindir=${prefix}/bin/zabbix \ |
---|
21 | --sbindir=${prefix}/sbin/zabbix \ |
---|
22 | --libexecdir=${prefix}/libexec/zabbix \ |
---|
23 | --datadir=${prefix}/share/zabbix \ |
---|
24 | --sysconfdir=${prefix}/etc/zabbix \ |
---|
25 | --localstatedir=${prefix}/var/zabbix |
---|
26 | |
---|
27 | distname zabbix-1.8.6 |
---|
28 | |
---|
29 | configure.ldflags-append -lresolv |
---|
30 | |
---|
31 | startupitem.create yes |
---|
32 | startupitem.name zabbix_agentd |
---|
33 | startupitem.start "${prefix}/share/zabbix/zabbix_agentd.init start" |
---|
34 | startupitem.stop "${prefix}/share/zabbix/zabbix_agentd.init stop" |
---|
35 | |
---|
36 | |
---|
37 | post-patch { |
---|
38 | reinplace "s|# PidFile=/tmp/zabbix_agentd.pid|PidFile=/var/tmp/zabbix_agentd.pid|g" \ |
---|
39 | ${worksrcpath}/misc/conf/zabbix_agentd.conf |
---|
40 | } |
---|
41 | |
---|
42 | |
---|
43 | pre-destroot { |
---|
44 | adduser zabbix |
---|
45 | addgroup zabbix |
---|
46 | } |
---|
47 | |
---|
48 | post-destroot { |
---|
49 | |
---|
50 | # Copy sample agent .conf files |
---|
51 | xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix |
---|
52 | xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agent.conf \ |
---|
53 | ${destroot}${prefix}/etc/zabbix/zabbix_agent.conf.sample |
---|
54 | xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agentd.conf \ |
---|
55 | ${destroot}${prefix}/etc/zabbix/zabbix_agentd.conf.sample |
---|
56 | |
---|
57 | # Copy a startup script for the agent |
---|
58 | xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix |
---|
59 | xinstall -m 755 ${portpath}/${filesdir}/zabbix_agentd.init \ |
---|
60 | ${destroot}${prefix}/share/zabbix |
---|
61 | reinplace "s|__PREFIX__|${prefix}|g" \ |
---|
62 | ${destroot}${prefix}/share/zabbix/zabbix_agentd.init |
---|
63 | |
---|
64 | # Copy Win32 agent for normal and agent_only installs |
---|
65 | xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix/zabbix_agent_win32 |
---|
66 | xinstall -m 755 ${worksrcpath}/bin/win32/zabbix_agentd.exe \ |
---|
67 | ${destroot}${prefix}/share/zabbix/zabbix_agent_win32 |
---|
68 | } |
---|
69 | |
---|
70 | |
---|
71 | notes \ |
---|
72 | "#### ZABBIX agent installation section (steps 1 - 3 only) #### |
---|
73 | |
---|
74 | 1) Edit the sample .conf file ${prefix}/etc/zabbix/zabbix_agentd.conf (rename & omit .sample) |
---|
75 | |
---|
76 | Set the following variable to the ip address of your ZABBIX server to |
---|
77 | allow it access to the agent. |
---|
78 | |
---|
79 | Server=x.x.x.x |
---|
80 | |
---|
81 | |
---|
82 | 2) Set zabbix_agentd to run at system boot |
---|
83 | |
---|
84 | sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix_agentd.plist |
---|
85 | |
---|
86 | To start Zabbix manually, use: ${prefix}/share/zabbix/zabbix_agentd.init start (stop|status) |
---|
87 | |
---|
88 | |
---|
89 | 3) A Win32 agent is in ${prefix}/share/zabbix/zabbix_agent_win32 for |
---|
90 | installation on Windows NT 4.0, Windows 2000, and Windows XP. |
---|
91 | |
---|
92 | |
---|
93 | #### End ZABBIX agent installation section #### |
---|
94 | #### ####" |
---|