From e178edb47adb650ebbe27dd7db861aa5ec155324 Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Wed, 13 Oct 2010 21:24:55 +0200 Subject: [PATCH] fix web package --- debian/check-mk-server-common.dirs | 1 + debian/check-mk-server-common.install | 2 +- debian/check-mk-web.dirs | 2 ++ debian/check-mk-web.install | 3 ++- debian/check-mk-web.postinst | 32 +++++++++++++++++++++++++++ debian/control | 7 +++--- debian/rules | 4 +++- 7 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 debian/check-mk-web.dirs create mode 100644 debian/check-mk-web.postinst diff --git a/debian/check-mk-server-common.dirs b/debian/check-mk-server-common.dirs index 9ffdbeb..ed24ece 100644 --- a/debian/check-mk-server-common.dirs +++ b/debian/check-mk-server-common.dirs @@ -1 +1,2 @@ etc/check_mk/conf.d +var/lib/check_mk diff --git a/debian/check-mk-server-common.install b/debian/check-mk-server-common.install index 40e9c0b..dd0b09f 100644 --- a/debian/check-mk-server-common.install +++ b/debian/check-mk-server-common.install @@ -1,6 +1,6 @@ etc/check_mk/main.mk etc/check_mk/conf.d/README -var/lib/check_mk +var/lib/check_mk/{autochecks,cache,counters,logwatch,packages,precompiled,rrd} usr/bin/check_mk usr/share/doc/check_mk/check_mk_templates.cfg usr/share/check_mk/modules diff --git a/debian/check-mk-web.dirs b/debian/check-mk-web.dirs new file mode 100644 index 0000000..0376e88 --- /dev/null +++ b/debian/check-mk-web.dirs @@ -0,0 +1,2 @@ +etc/check_mk +var/lib/check_mk/ diff --git a/debian/check-mk-web.install b/debian/check-mk-web.install index d9c4766..c122903 100644 --- a/debian/check-mk-web.install +++ b/debian/check-mk-web.install @@ -1,3 +1,4 @@ usr/share/check_mk/web -usr/share/check_mk/web/htdocs/* usr/share/icinga/htdocs etc/apache2/conf.d/zzz_check_mk.conf +etc/check_mk/multisite.mk +var/lib/check_mk/web diff --git a/debian/check-mk-web.postinst b/debian/check-mk-web.postinst new file mode 100644 index 0000000..a1aa1b3 --- /dev/null +++ b/debian/check-mk-web.postinst @@ -0,0 +1,32 @@ +#!/bin/bash + +set -e + +. /usr/share/debconf/confmodule + +setperm() { + local user="$1" + local group="$2" + local mode="$3" + local file="$4" + shift 4 + # only do something when no setting exists + if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then + chown "$user":"$group" "$file" + chmod "$mode" "$file" + fi +} + +case "$1" in + configure) + # explicitly set permissions on some files + setperm www-data www-data 770 /var/lib/check_mk/web + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \$1'" >&2 + exit 1 + ;; +esac + diff --git a/debian/control b/debian/control index 4769d98..2e85884 100644 --- a/debian/control +++ b/debian/control @@ -76,8 +76,8 @@ Description: general purpose nagios-plugin for retrieving data Package: check-mk-web Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Suggests: xinetd +Depends: ${shlibs:Depends}, ${misc:Depends}, libapache2-mod-python +Suggests: check-mk-livestatus Description: general purpose nagios-plugin for retrieving data Check_mk adopts a new a approach for collecting data from operating systems and network components. It obsoletes NRPE, check_by_ssh, NSClient and @@ -86,4 +86,5 @@ Description: general purpose nagios-plugin for retrieving data * Significant reduction of CPU usage on the Nagios host. * Automatic inventory of items to be checked on hosts. . - This package contains the webfrontend to check_mk + This package contains the webfrontend of check_mk also known as + "MK-Multisite" diff --git a/debian/rules b/debian/rules index c31d733..ca6a998 100755 --- a/debian/rules +++ b/debian/rules @@ -54,7 +54,9 @@ install: build dh_prep dh_installdirs mkdir -p debian/tmp - DESTDIR=debian/tmp ./setup.sh --yes + DESTDIR=debian/tmp \ + livesock=/var/lib/nagios3/rw/live \ + ./setup.sh --yes cp -a livestatus.src/debian/tmp/* debian/tmp/ rm debian/tmp/usr/share/check_mk/modules/defaults mkdir -p debian/check-mk-server-icinga/usr/share/check_mk/modules/ -- 2.30.2