summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Pichler2016-11-16 01:24:40 +0100
committerGeorg Pichler2016-11-16 01:24:40 +0100
commitdea82ecc1051ec53759d3402c1f631560a51858d (patch)
treea091249047fedd7cb22f401b96da94e3e53c970f
parente88f2f460d95378d395b8328e63d145fe748150d (diff)
downloadaur-dea82ecc1051ec53759d3402c1f631560a51858d.tar.gz
Nagios now restarts properly
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD8
-rwxr-xr-xinit.d.check_mk29
3 files changed, 39 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 924158cb84a..5cbfbdf74b8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = check_mk
pkgdesc = A comprehensive IT monitoring solution in the tradition of Nagios
pkgver = 1.2.8p13
- pkgrel = 1
+ pkgrel = 2
url = http://mathias-kettner.com/check_mk.html
install = check_mk.install
arch = any
@@ -16,11 +16,13 @@ pkgbase = check_mk
optdepends = pnp4nagios: Graphing performance data
backup = etc/nagios/htpasswd.users
source = https://mathias-kettner.de/download/check_mk-1.2.8p13.tar.gz
+ source = init.d.check_mk
source = check_mk_templates.cfg.patch
source = mkp.patch
source = check_mk.patch
source = setup.sh.patch
md5sums = df04190dea014f586f2723a6fb6b5419
+ md5sums = 078175f2851419ae53346a06a42f9f2c
md5sums = e10a352fff0563bddeb788c7f9aee759
md5sums = 5e8cb4a9ca2b7e17c1c902be43808653
md5sums = dff7c1d42947b4b54e2953dd31def78a
diff --git a/PKGBUILD b/PKGBUILD
index 218cb3aba0e..5740fd524c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ _agent=n # agent is in seperate package check_mk-agent
pkgname=check_mk
pkgver=1.2.8p13
-pkgrel=1
+pkgrel=2
pkgdesc="A comprehensive IT monitoring solution in the tradition of Nagios"
license=('GPL2')
arch=('any')
@@ -22,12 +22,14 @@ depends=( 'python2'
optdepends=('pnp4nagios: Graphing performance data')
source=(
"https://mathias-kettner.de/download/${pkgname}-${pkgver}.tar.gz"
+ 'init.d.check_mk'
'check_mk_templates.cfg.patch'
'mkp.patch'
'check_mk.patch'
'setup.sh.patch'
)
md5sums=('df04190dea014f586f2723a6fb6b5419'
+ '078175f2851419ae53346a06a42f9f2c'
'e10a352fff0563bddeb788c7f9aee759'
'5e8cb4a9ca2b7e17c1c902be43808653'
'dff7c1d42947b4b54e2953dd31def78a'
@@ -52,6 +54,7 @@ package() {
check_icmp_path='/usr/lib/monitoring-plugins/check_icmp' \
apache_config_dir='/etc/httpd/conf/extra' \
livesock='/var/nagios/rw/live' \
+ nagios_startscript='/usr/share/check_mk/init.d.check_mk' \
nagios_version='4.2.2' \
./setup.sh
@@ -70,6 +73,9 @@ package() {
ln -s "/usr/share/check_mk/agents/check_mk_agent.linux" "./usr/bin/check_mk_agent"
ln -s "/usr/share/check_mk/agents/xinetd.conf" "./etc/xinetd.d/check_mk"
ln -s "/usr/share/check_mk/agents/waitmax" "./usr/bin/waitmax"
+
+ # Add init.d dummy script
+ cp "${srcdir}/init.d.check_mk" "./usr/share/check_mk/init.d.check_mk"
# Use proper webapps directory for apache config
mkdir -p "./etc/webapps/check_mk"
diff --git a/init.d.check_mk b/init.d.check_mk
new file mode 100755
index 00000000000..9ad0dfad2e0
--- /dev/null
+++ b/init.d.check_mk
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+SERVICE=nagios
+
+stop() {
+ systemctl stop $SERVICE
+}
+
+start() {
+ systemctl start $SERVICE
+}
+
+restart() {
+ systemctl restart $SERVICE
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+esac