]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/monit
suricata: Change midstream policy to "pass-flow"
[ipfire-2.x.git] / lfs / monit
CommitLineData
58dca4e5
DW
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
f74552d5 4# Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
58dca4e5
DW
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
6b53d3b1 27VER = 5.33.0
f15707c7
RR
28SUMMARY = Utility for monitoring services on a Unix system
29
58dca4e5
DW
30THISAPP = monit-$(VER)
31DL_FILE = $(THISAPP).tar.gz
32DL_FROM = $(URL_IPFIRE)
33DIR_APP = $(DIR_SRC)/$(THISAPP)
34TARGET = $(DIR_INFO)/$(THISAPP)
35PROG = monit
f74552d5 36PAK_VER = 22
58dca4e5 37
2dc2a278 38DEPS =
58dca4e5 39
f15707c7
RR
40SERVICES = monit
41
58dca4e5
DW
42###############################################################################
43# Top-level Rules
44###############################################################################
45
46objects = $(DL_FILE)
47
48$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
49
6b53d3b1 50$(DL_FILE)_BLAKE2 = 770474f010067fe6388622e764a0d032495589dad24873dabd87ab0aa8edcff34d7a014a72c1c05aaa47104b12daf3dc542aa1d2d823d267814c9b5fd139e747
58dca4e5
DW
51
52install : $(TARGET)
53
54check : $(patsubst %,$(DIR_CHK)/%,$(objects))
55
56download :$(patsubst %,$(DIR_DL)/%,$(objects))
57
9a7e4d85 58b2 : $(subst %,%_BLAKE2,$(objects))
58dca4e5 59
af5db809 60dist:
58dca4e5
DW
61 @$(PAK)
62
63###############################################################################
9a7e4d85 64# Downloading, checking, b2sum
58dca4e5
DW
65###############################################################################
66
67$(patsubst %,$(DIR_CHK)/%,$(objects)) :
68 @$(CHECK)
69
70$(patsubst %,$(DIR_DL)/%,$(objects)) :
71 @$(LOAD)
72
9a7e4d85
PM
73$(subst %,%_BLAKE2,$(objects)) :
74 @$(B2SUM)
58dca4e5
DW
75
76###############################################################################
77# Installation Details
78###############################################################################
79
80$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
81 @$(PREBUILD)
82 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
a0767955
MF
83 cd $(DIR_APP) && ./configure \
84 --prefix=/usr \
85 --sysconfdir=/etc \
86 --localstatedir=/var
87
58dca4e5
DW
88 cd $(DIR_APP) && make $(MAKETUNING)
89 cd $(DIR_APP) && make install
6047b2c1 90
a40a1e25 91 mkdir -p /var/lib/monit
3e4e65dd 92 mkdir -p /etc/monit.d
a40a1e25 93
6b53d3b1 94 # Install backup include file
58dca4e5 95 install -v -m 644 $(DIR_SRC)/config/backup/includes/monit \
a0767955 96 /var/ipfire/backup/addons/includes/monit
58dca4e5 97
a0767955
MF
98 # Install default configuration
99 install -v -m 600 $(DIR_SRC)/config/monit/monitrc /etc
58dca4e5 100
586761dd 101 #install initscripts
f15707c7 102 $(call INSTALL_INITSCRIPTS,$(SERVICES))
586761dd 103
6b53d3b1 104 # Install start links
57865e53
DW
105 ln -sf ../init.d/monit /etc/rc.d/rc3.d/S60monit
106 ln -sf ../init.d/monit /etc/rc.d/rc0.d/K40monit
107 ln -sf ../init.d/monit /etc/rc.d/rc6.d/K40monit
108
7ce49ff0 109 @rm -rf $(DIR_APP)
58dca4e5 110 @$(POSTBUILD)