mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-13 16:11:37 +02:00
monit addon: First version.
This commit is contained in:
7
config/rootfiles/packages/monit
Normal file
7
config/rootfiles/packages/monit
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
etc/rc.d/rc0.d/K40monit
|
||||||
|
etc/rc.d/rc3.d/S60monit
|
||||||
|
etc/rc.d/rc6.d/K40monit
|
||||||
|
etc/init.d/monit
|
||||||
|
usr/bin/monit
|
||||||
|
#usr/share/man/man1/monit.1
|
||||||
|
var/ipfire/backup/addons/includes/monit
|
||||||
93
lfs/monit
Normal file
93
lfs/monit
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
###############################################################################
|
||||||
|
# #
|
||||||
|
# IPFire.org - A linux based firewall #
|
||||||
|
# Copyright (C) 2009 Michael Tremer & Christian Schmidt #
|
||||||
|
# #
|
||||||
|
# This program is free software: you can redistribute it and/or modify #
|
||||||
|
# it under the terms of the GNU General Public License as published by #
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or #
|
||||||
|
# (at your option) any later version. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, #
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||||
|
# GNU General Public License for more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License #
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||||
|
# #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Definitions
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
include Config
|
||||||
|
|
||||||
|
VER = 5.8
|
||||||
|
|
||||||
|
THISAPP = monit-$(VER)
|
||||||
|
DL_FILE = $(THISAPP).tar.gz
|
||||||
|
DL_FROM = $(URL_IPFIRE)
|
||||||
|
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||||
|
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||||
|
PROG = monit
|
||||||
|
PAK_VER = 1
|
||||||
|
|
||||||
|
DEPS = ""
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Top-level Rules
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
objects = $(DL_FILE)
|
||||||
|
|
||||||
|
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||||
|
|
||||||
|
$(DL_FILE)_MD5 = c6873b0828f872676f9e7fe1476a8dc2
|
||||||
|
|
||||||
|
install : $(TARGET)
|
||||||
|
|
||||||
|
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||||
|
|
||||||
|
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||||
|
|
||||||
|
md5 : $(subst %,%_MD5,$(objects))
|
||||||
|
|
||||||
|
dist:
|
||||||
|
@$(PAK)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Downloading, checking, md5sum
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||||
|
@$(CHECK)
|
||||||
|
|
||||||
|
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||||
|
@$(LOAD)
|
||||||
|
|
||||||
|
$(subst %,%_MD5,$(objects)) :
|
||||||
|
@$(MD5)
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Installation Details
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||||
|
@$(PREBUILD)
|
||||||
|
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||||
|
cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc
|
||||||
|
cd $(DIR_APP) && make $(MAKETUNING)
|
||||||
|
cd $(DIR_APP) && make install
|
||||||
|
install -v -m 644 $(DIR_SRC)/config/backup/includes/monit \
|
||||||
|
/var/ipfire/backup/addons/includes/monit
|
||||||
|
ln -sf ../init.d/pound /etc/rc.d/rc3.d/S60monit
|
||||||
|
ln -sf ../init.d/pound /etc/rc.d/rc0.d/K40monit
|
||||||
|
ln -sf ../init.d/pound /etc/rc.d/rc6.d/K40monit
|
||||||
|
|
||||||
|
# Remove temporary file.
|
||||||
|
rm -vf /root/.rnd
|
||||||
|
|
||||||
|
# @rm -rf $(DIR_APP)
|
||||||
|
@$(POSTBUILD)
|
||||||
1
make.sh
1
make.sh
@@ -730,6 +730,7 @@ buildipfire() {
|
|||||||
ipfiremake iftop
|
ipfiremake iftop
|
||||||
ipfiremake motion
|
ipfiremake motion
|
||||||
ipfiremake joe
|
ipfiremake joe
|
||||||
|
ipfiremake monit
|
||||||
ipfiremake nut
|
ipfiremake nut
|
||||||
ipfiremake watchdog
|
ipfiremake watchdog
|
||||||
ipfiremake libpri
|
ipfiremake libpri
|
||||||
|
|||||||
39
src/initscripts/init.d/monit
Normal file
39
src/initscripts/init.d/monit
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
########################################################################
|
||||||
|
# Begin $rc_base/init.d/monit
|
||||||
|
#
|
||||||
|
# Description : monit monitoring daemon
|
||||||
|
#
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
. /etc/sysconfig/rc
|
||||||
|
. ${rc_functions}
|
||||||
|
|
||||||
|
case "${1}" in
|
||||||
|
start)
|
||||||
|
boot_mesg "Starting monit..."
|
||||||
|
loadproc /usr/sbin/monit
|
||||||
|
;;
|
||||||
|
|
||||||
|
stop)
|
||||||
|
boot_mesg "Stopping monit..."
|
||||||
|
killproc /usr/sbin/monit
|
||||||
|
;;
|
||||||
|
|
||||||
|
restart)
|
||||||
|
${0} stop
|
||||||
|
sleep 1
|
||||||
|
${0} start
|
||||||
|
;;
|
||||||
|
|
||||||
|
status)
|
||||||
|
statusproc /usr/sbin/monit
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Usage: ${0} {start|stop|restart|status}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# End $rc_base/init.d/monit
|
||||||
Reference in New Issue
Block a user