[Pkg-nagios-changes] [pkg-icinga2] 12/17: Initial import of the debian/ dir
Markus Frosch
lazyfrosch-guest at alioth.debian.org
Wed Oct 9 20:19:00 UTC 2013
This is an automated email from the git hooks/post-receive script.
lazyfrosch-guest pushed a commit to branch master
in repository pkg-icinga2.
commit 2742a8a696f3ec46335b6d5bdd7c76d9e977e0c5
Author: Alexander Wirt <formorer at grml.org>
Date: Fri Apr 26 10:45:22 2013 +0200
Initial import of the debian/ dir
---
debian/README.source | 9 +++
debian/changelog | 5 ++
debian/compat | 1 +
debian/control | 43 +++++++++++++
debian/copyright | 38 ++++++++++++
debian/docs | 2 +
debian/etc/icinga2.conf | 83 +++++++++++++++++++++++++
debian/icinga2.dirs | 2 +
debian/icinga2.init | 153 +++++++++++++++++++++++++++++++++++++++++++++++
debian/icinga2.install | 1 +
debian/rules | 16 +++++
debian/source/format | 1 +
12 files changed, 354 insertions(+)
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..9948994
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,9 @@
+icinga2 for Debian
+------------------
+
+<this file describes information about the source package, see Debian policy
+manual section 4.14. You WILL either need to modify or delete this file>
+
+
+
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..2d3f487
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+icinga2 (2.0-1) unstable; urgency=low
+
+ * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
+
+ -- Alexander Wirt <formorer at debian.org> Tue, 25 Sep 2012 22:09:24 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..835d780
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,43 @@
+Source: icinga2
+Section: admin
+Priority: extra
+Maintainer: Alexander Wirt <formorer at debian.org>
+Build-Depends: asciidoc,
+ automake,
+ autotools-dev,
+ bison,
+ debhelper (>= 9),
+ doxygen,
+ flex,
+ g++,
+ libboost-dev,
+ libboost-program-options-dev,
+ libboost-signals-dev,
+ libboost-system-dev,
+ libboost-test-dev,
+ libboost-thread-dev,
+ libltdl-dev,
+ libssl-dev,
+ libtool,
+ python-dev
+Standards-Version: 3.9.3
+Homepage: <insert the upstream URL, if relevant>
+
+Package: icinga2
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: host and network monitoring system
+ Icinga is a modular monitoring framework for hosts, services, and
+ networks, based on the Nagios project. It is designed to be easy to
+ understand and modify to fit any need.
+ .
+ Features include:
+ * monitoring of network services via ping, SMTP, POP3, HTTP, NNTP, or
+ TCP port;
+ * plugin interface to allow for user-developed service checks
+ * contact notifications when problems occur and get resolved (via
+ email, pager, or user-defined method)
+ * support for proactive problem resolution (handlers can be defined to
+ be run during service or host events)
+ * web output: current status, notifications, problem history, log
+ file, etc.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2ec5382
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,38 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: icinga2
+Source: <url://example.com>
+
+Files: *
+Copyright: <years> <put author's name and email here>
+ <years> <likewise for another author>
+License: <special license>
+ <Put the license of the package here indented by 1 space>
+ <This follows the format of Description: lines in control file>
+ .
+ <Including paragraphs>
+
+# If you want to use GPL v2 or later for the /debian/* files use
+# the following clauses, or change it to suit. Delete these two lines
+Files: debian/*
+Copyright: 2012 Alexander Wirt <formorer at debian.org>
+License: GPL-2+
+ This package 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 2 of the License, or
+ (at your option) any later version.
+ .
+ This package 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/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
+# Please avoid to pick license terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..50bd824
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+NEWS
+README
diff --git a/debian/etc/icinga2.conf b/debian/etc/icinga2.conf
new file mode 100644
index 0000000..835de77
--- /dev/null
+++ b/debian/etc/icinga2.conf
@@ -0,0 +1,83 @@
+/**
+ * Icinga 2 configuration file
+ * - this is where you define settings for the Icinga application including
+ * which hosts/services to check.
+ *
+ * The /usr/share/doc/icinga2-config.txt file in the source tarball has a detailed
+ * description of what configuration options are available.
+ */
+
+/**
+ * Global configuration settings
+ */
+local object IcingaApplication "icinga" {
+ macros = {
+ plugindir = "/usr/lib/nagios/plugins"
+ },
+ pidpath = "/var/run/icinga2.pid",
+ logpath = "/var/log/icinga2/icinga2.log",
+ statepath = "/var/lib/icinga2/icinga2.state",
+}
+
+/**
+ * The checker component takes care of executing service checks.
+ */
+local object Component "checker" {
+
+}
+
+/**
+ * The delegation component assigns services to checkers. You need to load
+ * this component even if your Icinga setup only consists of a single instance.
+ */
+local object Component "delegation" {
+
+}
+
+/**
+ * The compat component periodically updates the status.dat and objects.cache
+ * files. These are used by the Icinga 1.x CGIs to display the state of
+ * hosts and services.
+ */
+local object Component "compat" {
+
+}
+
+/**
+ * This template defines some basic parameters for services that use
+ * external plugins for their checks.
+ */
+abstract object Service "icinga-service" {
+ methods = {
+ check = "native::PluginCheck"
+ }
+}
+
+/**
+ * The service template for ping checks. In an Icinga 1.x environment
+ * this would be defined as a check command.
+ */
+abstract object Service "ping" inherits "icinga-service" {
+ check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
+
+ macros += {
+ wrta = 50,
+ wpl = 5,
+ crta = 100,
+ cpl = 10
+ }
+}
+
+/**
+ * And finally we define some host that should be checked.
+ */
+object Host "localhost" {
+ services = { "ping" },
+
+ macros = {
+ address = "127.0.0.1"
+ },
+
+ check_interval = 1m
+}
+
diff --git a/debian/icinga2.dirs b/debian/icinga2.dirs
new file mode 100644
index 0000000..f835359
--- /dev/null
+++ b/debian/icinga2.dirs
@@ -0,0 +1,2 @@
+var/log/icinga2
+var/lib/icinga2
diff --git a/debian/icinga2.init b/debian/icinga2.init
new file mode 100644
index 0000000..6f44ca1
--- /dev/null
+++ b/debian/icinga2.init
@@ -0,0 +1,153 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: icinga2
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: icinga2 host/service/network monitoring and management system
+# Description: icinga2 is a monitoring and management system for hosts, services and networks.
+### END INIT INFO
+
+# Author: Alexander Wirt <formorer at debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="icinga2 monitoring daemon"
+NAME=icinga2
+DAEMON=/usr/sbin/icinga2
+DAEMON_ARGS="-c /etc/icinga2/icinga2.conf -d"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+ || return 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+ $DAEMON_ARGS \
+ || return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ # Wait for children to finish too if this is a daemon that forks
+ # and if the daemon is only ever run from this initscript.
+ # If the above conditions are not satisfied then add some other code
+ # that waits for the process to drop all resources that could be
+ # needed by services started subsequently. A last resort is to
+ # sleep for some time.
+ start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+ [ "$?" = 2 ] && return 2
+ # Many daemons don't delete their pidfiles when they exit.
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+ #
+ # If the daemon can reload its configuration without
+ # restarting (for example, when it is sent a SIGHUP),
+ # then implement that here.
+ #
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+ return 0
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/debian/icinga2.install b/debian/icinga2.install
new file mode 100644
index 0000000..08065de
--- /dev/null
+++ b/debian/icinga2.install
@@ -0,0 +1 @@
+debian/etc/icinga2.conf etc/icinga2
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..e576555
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+ dh $@ --with autotools-dev
+
+override_dh_auto_configure:
+ dh_auto_configure -- --enable-python
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icinga2.git
More information about the Pkg-nagios-changes
mailing list