Lines 35-65
src_prepare() {
Link Here
|
35 |
|
35 |
|
36 |
src_configure() { |
36 |
src_configure() { |
37 |
if has_version net-analyzer/nagios-core; then |
37 |
if has_version net-analyzer/nagios-core; then |
38 |
export nagiosuser=nagios |
38 |
export mydaemon=nagios |
39 |
export nagios_binary=/usr/sbin/nagios |
|
|
40 |
export nagios_config_file=/etc/nagios/nagios.cfg |
41 |
export nagconfdir=/etc/nagios/check_mk.d |
42 |
export nagios_startscript=/etc/init.d/nagios |
43 |
export nagpipe=/var/nagios/rw/nagios.cmd |
44 |
export check_result_path=/var/nagios/spool/checkresults |
45 |
export nagios_status_file=/var/nagios/status.dat |
46 |
export htpasswd_file=/etc/nagios/htpasswd.users |
47 |
export nagios_auth_name="Nagios Access" |
39 |
export nagios_auth_name="Nagios Access" |
48 |
export rrd_path=/var/nagios/perfdata |
|
|
49 |
else |
40 |
else |
50 |
export nagiosuser=icinga |
41 |
export mydaemon=icinga |
51 |
export nagios_binary=/usr/sbin/icinga |
|
|
52 |
export nagios_config_file=/etc/icinga/icinga.cfg |
53 |
export nagconfdir=/etc/icinga/check_mk.d |
54 |
export nagios_startscript=/etc/init.d/icinga |
55 |
export nagpipe=/var/lib/icinga/rw/icinga.cmd |
56 |
export check_result_path=/var/lib/icinga/spool/checkresults |
57 |
export nagios_status_file=/var/lib/icinga/status.dat |
58 |
export htpasswd_file=/etc/icinga/htpasswd.users |
59 |
export nagios_auth_name="Icinga Access" |
42 |
export nagios_auth_name="Icinga Access" |
60 |
export rrd_path=/var/lib/icinga/perfdata |
|
|
61 |
fi |
43 |
fi |
62 |
|
44 |
export nagiosuser=${mydaemon} |
|
|
45 |
export nagios_binary=/usr/sbin/${mydaemon} |
46 |
export nagios_config_file=/etc/${mydaemon}/${mydaemon}.cfg |
47 |
export nagconfdir=/etc/${mydaemon}/check_mk.d |
48 |
export nagios_startscript=/etc/init.d/${mydaemon} |
49 |
export nagpipe=/var/lib/${mydaemon}/rw/${mydaemon} |
50 |
export check_result_path=/var/lib/${mydaemon}/spool/checkresults |
51 |
export nagios_status_file=/var/lib/${mydaemon}/status.dat |
52 |
export rrd_path=/var/lib/${mydaemon}/perfdata |
63 |
export docdir=/usr/share/doc/${PF} |
53 |
export docdir=/usr/share/doc/${PF} |
64 |
export checkmandir=/usr/share/doc/${PF}/checks |
54 |
export checkmandir=/usr/share/doc/${PF}/checks |
65 |
export check_icmp_path=/usr/lib/nagios/plugins/check_icmp |
55 |
export check_icmp_path=/usr/lib/nagios/plugins/check_icmp |
Lines 89-102
src_compile() {
Link Here
|
89 |
} |
79 |
} |
90 |
|
80 |
|
91 |
src_install() { |
81 |
src_install() { |
92 |
local mydaemon= |
|
|
93 |
|
94 |
if has_version net-analyzer/nagios-core; then |
95 |
mydaemon=nagios |
96 |
else |
97 |
mydaemon=icinga |
98 |
fi |
99 |
|
100 |
if ! use agent-only; then |
82 |
if ! use agent-only; then |
101 |
# Apache configuration |
83 |
# Apache configuration |
102 |
insinto /etc/apache2/modules.d |
84 |
insinto /etc/apache2/modules.d |
Lines 134-140
EOF
Link Here
|
134 |
|
116 |
|
135 |
# Nagios / Icinga check_mk templates |
117 |
# Nagios / Icinga check_mk templates |
136 |
insinto /etc/${mydaemon}/check_mk.d |
118 |
insinto /etc/${mydaemon}/check_mk.d |
137 |
doins etc/icinga/check_mk.d/check_mk_templates.cfg |
119 |
doins etc/${mydaemon}/check_mk.d/check_mk_templates.cfg |
138 |
|
120 |
|
139 |
dobin usr/bin/check_mk |
121 |
dobin usr/bin/check_mk |
140 |
dobin usr/bin/mkp |
122 |
dobin usr/bin/mkp |
Lines 146-153
EOF
Link Here
|
146 |
rm "${S}"/usr/share/doc/${PF}/treasures/modbus/agent_modbus || die "Couldn't remove precompiled agent_modbus" |
128 |
rm "${S}"/usr/share/doc/${PF}/treasures/modbus/agent_modbus || die "Couldn't remove precompiled agent_modbus" |
147 |
fi |
129 |
fi |
148 |
|
130 |
|
149 |
#keepdir /usr/share/check_mk |
|
|
150 |
#cp -R "${S}"/usr/share/check_mk/* "${D}"/usr/share/check_mk/ || die "copying files to ${D}/usr/share/check_mk/ failed!" |
151 |
insinto /usr/share/check_mk |
131 |
insinto /usr/share/check_mk |
152 |
doins -r usr/share/check_mk/* |
132 |
doins -r usr/share/check_mk/* |
153 |
|
133 |
|
Lines 301-314
EOF
Link Here
|
301 |
} |
281 |
} |
302 |
|
282 |
|
303 |
pkg_postinst() { |
283 |
pkg_postinst() { |
304 |
local mydaemon= |
|
|
305 |
|
306 |
if has_version net-analyzer/nagios-core; then |
307 |
mydaemon=nagios |
308 |
else |
309 |
mydaemon=icinga |
310 |
fi |
311 |
|
312 |
if ! use agent-only; then |
284 |
if ! use agent-only; then |
313 |
elog "IMPORTANT: Please add the following line to your" |
285 |
elog "IMPORTANT: Please add the following line to your" |
314 |
elog "/etc/${mydaemon}/${mydaemon}.cfg, so that" |
286 |
elog "/etc/${mydaemon}/${mydaemon}.cfg, so that" |