From e402d5619a9dd86e0f51fa39418f4db490ef1037 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Mon, 10 Oct 2011 21:21:36 +0000 Subject: debianization Ubuntization to be precise. Signed-off-by: Michael Krelin --- diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f3b7367 --- a/dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +dudki (0.2.2) natty; urgency=low + + * Initial debianized release. + + -- Michael Krelin Wed, 12 Oct 2011 21:58:01 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- a/dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..a899c85 --- a/dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: dudki +Section: utils +Priority: optional +Maintainer: Michael Krelin +Build-Depends: debhelper, cdbs, libdotconf-dev, pkg-config, xsltproc +Standards-Version: 3.9.1 +Homepage: http://kin.klever.net/dudki + +Package: dudki +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Process monitoring daemon + Dudki! is a simple maintenance daemon that checks whether certain processes + are running (based on pidfiles) and, if needed, tries to restart them. It + also supports a self-test command line invocation which can be used in a cron + job. + . diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..8ceaf0a --- a/dev/null +++ b/debian/copyright @@ -0,0 +1,19 @@ +Copyright (c) 2004-2006 Klever Group (http://www.klever.net/) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/debian/dudki.conf b/debian/dudki.conf new file mode 100644 index 0000000..cfd6800 --- a/dev/null +++ b/debian/dudki.conf @@ -0,0 +1,17 @@ +CheckInterval 75 +PidFile /var/run/dudki.pid +Daemonize on + +Notify mailto:root +MailtoHeader From "Dudki Process Manager " +MailtoHeader User-Agent "Dudki Process Manager" + + + PidFile /var/run/sshd.pid + RestartCommand "exec invoke-rc.d ssh restart" + + + + ProcessName cron + RestartCommand "exec invoke-rc.d cron restart" + diff --git a/debian/dudki.default b/debian/dudki.default new file mode 100644 index 0000000..6ca905a --- a/dev/null +++ b/debian/dudki.default @@ -0,0 +1 @@ +DUDKI_CONF=/etc/dudki.conf diff --git a/debian/dudki.docs b/debian/dudki.docs new file mode 100644 index 0000000..3cc350b --- a/dev/null +++ b/debian/dudki.docs @@ -0,0 +1,2 @@ +AUTHORS +NEWS diff --git a/debian/dudki.init b/debian/dudki.init new file mode 100644 index 0000000..aaab403 --- a/dev/null +++ b/debian/dudki.init @@ -0,0 +1,58 @@ +#! /bin/sh +# +# dudki dudki startup script +# + +### BEGIN INIT INFO +# Provides: dudki +# Required-Start: $local_fs $remote_fs $syslog +# Required-Stop: $local_fs $remote_fs $syslog +# Should-Start: +# Should-Stop: +# Default-Start: S 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: a process maintenance daemon +### END INIT INFO + +# Edit /etc/default/dudki to change options +DUDKI_CONF=/etc/dudki.conf + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DUDKI=/usr/sbin/dudki +NAME=dudki +DESC="process maintenance daemon" + +[ -x $DUDKI ] || exit 0 + +. /lib/lsb/init-functions + +[ -f /etc/default/$NAME ] && . /etc/default/$NAME + +case "$1" in + start) + log_daemon_msg "Starting $DESC $NAME" + $DUDKI -e + log_end_msg $? + ;; + stop) + log_daemon_msg "Stopping $DESC $NAME" + $DUDKI -k + log_end_msg $? + ;; + reload) + log_daemon_msg "Reloading $NAME configuration" + $DUDKI -r + log_end_msg $? + ;; + restart|force-reload) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/debian/dudki.install b/debian/dudki.install new file mode 100644 index 0000000..7a98d26 --- a/dev/null +++ b/debian/dudki.install @@ -0,0 +1 @@ +debian/dudki.conf usr/share/doc/dudki/ diff --git a/debian/dudki.postinst b/debian/dudki.postinst new file mode 100644 index 0000000..49dc83c --- a/dev/null +++ b/debian/dudki.postinst @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +if [ "$1" = "configure" ]; then + + if which ucf >/dev/null; then + ucf /usr/share/doc/dudki/dudki.conf /etc/dudki.conf + fi + + if which ucfr >/dev/null; then + ucfr dudki /etc/dudki.conf + fi +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/dudki.postrm b/debian/dudki.postrm new file mode 100644 index 0000000..34413ba --- a/dev/null +++ b/debian/dudki.postrm @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +if [ "$1" = "purge" ]; then + + if which ucf >/dev/null; then + ucf --purge /etc/dudki.conf + fi + + if which ucfr >/dev/null; then + ucfr --purge dudki /etc/dudki.conf + fi + + rm -f /etc/dudki.conf /etc/dudki.conf.*ucf* + +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..0860416 --- a/dev/null +++ b/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +makebuilddir/dudki:: + bash autogen.sh --version + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk + + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- a/dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) -- cgit v0.9.0.2