]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/zabbix_agentd
suricata: Change midstream policy to "pass-flow"
[people/pmueller/ipfire-2.x.git] / lfs / zabbix_agentd
CommitLineData
06fc6170
AK
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
9497d862 4# Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> #
06fc6170
AK
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
f15707c7
RR
27SUMMARY = Zabbix Agent
28
5ef6f1dc 29VER = 6.0.27
06fc6170
AK
30
31THISAPP = zabbix-$(VER)
32DL_FILE = $(THISAPP).tar.gz
33DL_FROM = $(URL_IPFIRE)
34DIR_APP = $(DIR_SRC)/$(THISAPP)
35TARGET = $(DIR_INFO)/$(THISAPP)
36PROG = zabbix_agentd
5ef6f1dc 37PAK_VER = 12
50fdf0ee
RR
38
39DEPS = fping
06fc6170 40
f15707c7
RR
41SERVICES = zabbix_agentd
42
06fc6170
AK
43###############################################################################
44# Top-level Rules
45###############################################################################
46
47objects = $(DL_FILE)
48
49$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
50
5ef6f1dc 51$(DL_FILE)_BLAKE2 = 793bb887bd8f0d3c2f3d15a4ed9bb5b1fcfb13fcf80ea077672744a1bd8524e213eaf53291e0f9eecb9eb055fee6f1e29e91f890b54698906beac21ca54db4e9
06fc6170
AK
52
53install : $(TARGET)
54
55check : $(patsubst %,$(DIR_CHK)/%,$(objects))
56
57download :$(patsubst %,$(DIR_DL)/%,$(objects))
58
9a7e4d85 59b2 : $(subst %,%_BLAKE2,$(objects))
06fc6170
AK
60
61dist:
62 @$(PAK)
63
64###############################################################################
9a7e4d85 65# Downloading, checking, b2sum
06fc6170
AK
66###############################################################################
67
68$(patsubst %,$(DIR_CHK)/%,$(objects)) :
69 @$(CHECK)
70
71$(patsubst %,$(DIR_DL)/%,$(objects)) :
72 @$(LOAD)
73
9a7e4d85
PM
74$(subst %,%_BLAKE2,$(objects)) :
75 @$(B2SUM)
06fc6170
AK
76
77###############################################################################
78# Installation Details
79###############################################################################
80
81$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
82 @$(PREBUILD)
83 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axvf $(DIR_DL)/$(DL_FILE)
84 cd $(DIR_APP) && ./configure \
85 --prefix=/usr \
86 --enable-agent \
87 --sysconfdir=/etc/zabbix_agentd \
9497d862
RR
88 --with-openssl \
89 --with-libcurl
06fc6170
AK
90
91 cd $(DIR_APP) && make
92 cd $(DIR_APP) && make install
93
94 # Create config directory and create files
95 -rmdir /etc/zabbix_agentd/zabbix_agentd.conf.d
96 -mkdir -pv /etc/zabbix_agentd/zabbix_agentd.d
97 -mkdir -pv /etc/zabbix_agentd/scripts
e2d54d57
RR
98 # Move upstream supplied config out of the way for reference
99 # and install our own version of the config.
100 -mv /etc/zabbix_agentd/zabbix_agentd.conf \
101 /etc/zabbix_agentd/zabbix_agentd.conf.example
06fc6170
AK
102 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/zabbix_agentd.conf \
103 /etc/zabbix_agentd/zabbix_agentd.conf
e2d54d57
RR
104
105 # Install IPFire-specific Zabbix Agent config
106 -mkdir -pv /var/ipfire/zabbix_agentd/userparameters
107 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/zabbix_agentd_ipfire_mandatory.conf \
108 /var/ipfire/zabbix_agentd/zabbix_agentd_ipfire_mandatory.conf
5737a22c 109 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/userparameter_pakfire.conf \
e2d54d57 110 /var/ipfire/zabbix_agentd/userparameters/userparameter_pakfire.conf
50fdf0ee
RR
111 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/userparameter_ipfire.conf \
112 /var/ipfire/zabbix_agentd/userparameters/userparameter_ipfire.conf
bff53f09
RR
113 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/userparameter_ovpn.conf \
114 /var/ipfire/zabbix_agentd/userparameters/userparameter_ovpn.conf
115
116 # Install IPFire-specific Zabbix Agent scripts
117 -mkdir -pv /var/ipfire/zabbix_agentd/scripts
118 install -v -m 755 $(DIR_SRC)/config/zabbix_agentd/ipfire_certificate_detail.sh \
119 /var/ipfire/zabbix_agentd/scripts/ipfire_certificate_detail.sh
06fc6170
AK
120
121 # Create directory for additional agent modules
122 -mkdir -pv /usr/lib/zabbix
123
06fc6170
AK
124 # Create directory for pid.
125 -mkdir -pv /var/run/zabbix
126 chown zabbix.zabbix /var/run/zabbix
127
128 # Install initscripts
f15707c7 129 @$(call INSTALL_INITSCRIPTS,$(SERVICES))
06fc6170
AK
130
131 # Install sudoers include file
a260900c 132 install -v -m 640 $(DIR_SRC)/config/zabbix_agentd/sudoers \
092330b1
RR
133 /etc/sudoers.d/zabbix_agentd
134 install -v -m 640 $(DIR_SRC)/config/zabbix_agentd/sudoers_user \
135 /etc/sudoers.d/zabbix_agentd_user
06fc6170
AK
136
137 # Install include file for backup
138 install -v -m 644 $(DIR_SRC)/config/backup/includes/zabbix_agentd \
139 /var/ipfire/backup/addons/includes/zabbix_agentd
140
06fc6170
AK
141 @rm -rf $(DIR_APP)
142 @$(POSTBUILD)