debian/0000755000000000000000000000000012232512335007164 5ustar debian/changelog0000644000000000000000000000270012232512335011035 0ustar kanla (1.4-1) unstable; urgency=low * New upstream release. (Closes: #723910) -- Michael Stapelberg Fri, 25 Oct 2013 17:57:15 +0200 kanla (1.3-2) unstable; urgency=low * Ship a systemd service file using dh-systemd -- Michael Stapelberg Sun, 16 Jun 2013 23:56:43 +0200 kanla (1.3-1) unstable; urgency=low * New upstream release. (Closes: #706463) * Drop debian/patches/config-perm.patch (merged upstream) -- Michael Stapelberg Thu, 23 May 2013 21:30:24 +0200 kanla (1.2-2) unstable; urgency=low * Install config files with permission 640 (Closes: #706465) * Raise dependency on libanyevent-xmpp-perl to >= 0.54, which is in Debian testing by now (Closes: #706439) * Run kanla as a dedicated user instead of root (Closes: #706436) * Move kanla packaging to collab-maint/git -- Michael Stapelberg Sat, 11 May 2013 23:34:04 +0200 kanla (1.2-1) unstable; urgency=low * New upstream version. * experimental to unstable to correct my mistake when initially uploading the package. I thought it belonged to experimental because of the freeze but that’s not true, since it’s a new package. -- Michael Stapelberg Sat, 30 Mar 2013 12:36:57 +0100 kanla (1.1-1) experimental; urgency=low * Initial Release (Closes: #703438) -- Michael Stapelberg Tue, 19 Mar 2013 17:49:53 +0100 debian/compat0000644000000000000000000000000212232507312010361 0ustar 8 debian/control0000644000000000000000000000225412232507312010571 0ustar Source: kanla Section: net Priority: optional Maintainer: Michael Stapelberg Build-Depends: debhelper (>= 8), dh-systemd Build-Depends-Indep: libanyevent-http-perl (>= 1.5), libanyevent-perl, libanyevent-xmpp-perl (>= 0.54), libconfig-general-perl (>= 2.44), libjson-xs-perl, libfile-sharedir-perl, libtest-mockmodule-perl, libtest-deep-perl, perl, perl-modules Standards-Version: 3.9.4 Homepage: http://kanla.zekjur.net/ Vcs-Git: git://anonscm.debian.org/collab-maint/kanla.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/kanla.git;a=summary Package: kanla Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, adduser, libanyevent-http-perl (>= 1.5), libanyevent-perl, libanyevent-xmpp-perl (>= 0.54), libconfig-general-perl (>= 2.44), libjson-xs-perl, libfile-sharedir-perl, perl Description: small-scale alerting daemon kanla is a daemon which periodically checks whether your website, mail server, etc. are still up and running. . In case a health check fails, kanla will notify you via jabber (XMPP). . Focus of kanla lies on being light-weight, being simple, using a sane configuration file, being well-documented. debian/copyright0000644000000000000000000000361012232507312011116 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Michael Stapelberg, Source: http://kanla.zekjur.net/ Upstream-Name: kanla Files: * Copyright: Michael Stapelberg, License: BSD Files: debian/* Copyright: 2012-2013, Michael Stapelberg License: BSD License: BSD Copyright © 2012-2013, Michael Stapelberg and contributors All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . * Neither the name of Michael Stapelberg nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY Michael Stapelberg ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Michael Stapelberg BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/kanla.doc-base0000644000000000000000000000037712232507312011657 0ustar Document: kanla Title: kanla documentation Author: Michael Stapelberg Abstract: The documentation explains how to use and extend kanla. Section: System/Monitoring Format: HTML Files: /usr/share/doc/kanla/*.html Index: /usr/share/doc/kanla/userguide.html debian/kanla.docs0000644000000000000000000000014212232507312011120 0ustar docs/userguide.html docs/contributions.html docs/installing-wheezy.html docs/installing-rhel.html debian/kanla.init0000755000000000000000000000754512232507312011154 0ustar #! /bin/sh ### BEGIN INIT INFO # Provides: kanla # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: small-scale alerting daemon # Description: Starts kanla on boot. ### END INIT INFO # Author: Michael Stapelberg # Do NOT "set -e" # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Description of the service" NAME=kanla DAEMON=/usr/bin/$NAME DAEMON_ARGS="" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME LOGFILE=/var/log/$NAME.log # 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 --background --make-pidfile --quiet --no-close \ --chuid kanla:kanla --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS >>$LOGFILE 2>&1 \ || 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 perl RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 PID=$(cat $PIDFILE) # Kill all plugin processes by killing the process group kill -- -$PID 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 : debian/kanla.lintian-overrides0000644000000000000000000000015112232507312013626 0ustar # These configuration files contain credentials so they are installed 640. kanla: non-standard-file-perm debian/kanla.postinst0000644000000000000000000000072512232507312012062 0ustar #!/bin/sh set -e if [ "$1" = "configure" ]; then if ! getent passwd kanla >/dev/null; then adduser --system --quiet --home / --no-create-home \ --shell /bin/false --group --gecos "kanla daemon user" kanla fi # Ensure configuration files are readable by the dedicated kanla user. chgrp -R kanla /etc/kanla # For upgrades: Ensure configuration files are not world-readable. find /etc/kanla -perm -o+r -type f -exec chmod 640 '{}' \; fi #DEBHELPER# exit 0 debian/kanla.service0000644000000000000000000000027112232507312011633 0ustar [Unit] Description=small-scale alerting daemon Documentation=man:kanla(1p) http://kanla.zekjur.net/ [Service] User=kanla ExecStart=/usr/bin/kanla [Install] WantedBy=multi-user.target debian/rules0000755000000000000000000000013612232507312010243 0ustar #!/usr/bin/make -f override_dh_fixperms: dh_fixperms -Xetc/kanla/ %: dh $@ --with=systemd debian/source/0000755000000000000000000000000012232507312010463 5ustar debian/source/format0000644000000000000000000000001412232507312011671 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000014212232507312010211 0ustar version=3 http://kanla.zekjur.net/downloads/ kanla-(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$