--- nagzilla-1.5.5-1.orig/debian/TODO +++ nagzilla-1.5.5-1/debian/TODO @@ -0,0 +1,5 @@ +* init.d script +* create system user +* run as system user +* config only readable by system user +* patch for password authentication --- nagzilla-1.5.5-1.orig/debian/nagzilla.install +++ nagzilla-1.5.5-1/debian/nagzilla.install @@ -0,0 +1,5 @@ +nagzillac.cfg /etc/nagzillac +nagzillac.pl /usr/bin +nagzillad /etc/logrotate.d +nagzillad.cfg /etc/nagzillad +nagzillad.pl /usr/bin --- nagzilla-1.5.5-1.orig/debian/control +++ nagzilla-1.5.5-1/debian/control @@ -0,0 +1,18 @@ +Source: nagzilla +Section: admin +Priority: extra +Maintainer: Gerfried Fuchs +Build-Depends: debhelper (>= 7), quilt +Standards-Version: 3.8.2 +Homepage: http://code.google.com/p/nagzilla/ + +Package: nagzilla +Architecture: all +Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}, + libconfig-simple-perl, libnet-jabber-perl, liblog-loglite-perl, adduser +Description: jabber relay bot + Nagzilla was designed to be a Jabber relay "bot" in that it sits quietly in a + room until it gets a message to relay to either a chatroom or a person. It is + split into two programs: + * nagzillad - the daemon that sits in the room and sends the messages, and + * nagzillac - the client that gets the messages and hands them to the daemon --- nagzilla-1.5.5-1.orig/debian/rules +++ nagzilla-1.5.5-1/debian/rules @@ -0,0 +1,89 @@ +#!/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 + + +include /usr/share/quilt/quilt.make + + +configure: configure-stamp +configure-stamp: $(QUILT_STAMPFN) + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + #$(MAKE) + #docbook-to-man debian/nagzilla.sgml > nagzilla.1 + + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + #$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # Add here commands to install the package into debian/nagzilla. + #$(MAKE) DESTDIR=$(CURDIR)/debian/nagzilla install + + +# Build architecture-independent files here. +binary-indep: install + dh_testdir + dh_testroot + dh_installchangelogs CHANGELOG + dh_installdocs + dh_installexamples + dh_install + cd $(CURDIR)/debian/nagzilla/usr/bin \ + && mv nagzillac.pl nagzillac \ + && mv nagzillad.pl nagzillad + chmod -x $(CURDIR)/debian/nagzilla/etc/logrotate.d/nagzillad + chmod 640 $(CURDIR)/debian/nagzilla/etc/nagzillad/nagzillad.cfg + chmod 644 $(CURDIR)/debian/nagzilla/etc/nagzillac/nagzillac.cfg + chmod 750 $(CURDIR)/debian/nagzilla/var/log/nagzilla +# dh_installdebconf +# dh_installlogrotate + dh_installinit --restart-after-upgrade --name=nagzillad + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_perl + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +binary-arch: install +# We have nothing to do by here. + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- nagzilla-1.5.5-1.orig/debian/changelog +++ nagzilla-1.5.5-1/debian/changelog @@ -0,0 +1,5 @@ +nagzilla (1.5.5-1-1) unstable; urgency=low + + * Initial release (Closes: #529274) + + -- Gerfried Fuchs Mon, 22 Jun 2009 10:38:09 +0200 --- nagzilla-1.5.5-1.orig/debian/postinst +++ nagzilla-1.5.5-1/debian/postinst @@ -0,0 +1,46 @@ +#!/bin/sh +# postinst script for nagzilla +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + if ! getent passwd nagzilla >/dev/null; then + adduser --disabled-password --quiet --system \ + --home /etc/nagzillad --no-create-home \ + --gecos "Nagzilla Daemon" --group nagzilla + fi + chown nagzilla:nagzilla /etc/nagzillad/nagzillad.cfg + chown nagzilla:adm /var/log/nagzilla + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- nagzilla-1.5.5-1.orig/debian/docs +++ nagzilla-1.5.5-1/debian/docs @@ -0,0 +1,2 @@ +README +TODO --- nagzilla-1.5.5-1.orig/debian/postrm +++ nagzilla-1.5.5-1/debian/postrm @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for nagzilla +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + deluser --quiet --system nagzilla > /dev/null || true + delgroup --quiet --system nagzilla > /dev/null || true + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- nagzilla-1.5.5-1.orig/debian/compat +++ nagzilla-1.5.5-1/debian/compat @@ -0,0 +1 @@ +7 --- nagzilla-1.5.5-1.orig/debian/dirs +++ nagzilla-1.5.5-1/debian/dirs @@ -0,0 +1,4 @@ +etc/nagzillac +etc/nagzillad +usr/bin +var/log/nagzilla --- nagzilla-1.5.5-1.orig/debian/watch +++ nagzilla-1.5.5-1/debian/watch @@ -0,0 +1,12 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +opts="uversionmangle=s/-release//" \ +http://code.google.com/p/nagzilla/ (?:.*/)?nagzilla-(.*)\.tgz --- nagzilla-1.5.5-1.orig/debian/nagzillac.1 +++ nagzilla-1.5.5-1/debian/nagzillac.1 @@ -0,0 +1,84 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH NAGZILLAC 1 "2009-06-03" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +nagzillac \- jabber relay bot client +.SH SYNOPSIS +.B nagzillac +.IR type ^ JID ^ message +.SH DESCRIPTION +This manual page documents briefly the +.B nagzillac +command. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBnagzillac\fP is the client for nagzilla that takes the data you hand +it as argument and sends it over to the nagzilla daemon that will send +the message along. +.PP +.SH OPTIONS +\fBnagzillac\fP only takes one options that consists of three +arguments. They are seperated by the carret character(`\fI^\fP'), +although the last argument may contain carrets without any troubles. +Here is an explenation of the different parts: +.TP +.B type +This is the type of the message. It can be either room (which will send +the message to a jabber conference room) or chat (target should be a +jabber ID). +.TP +.B JID +This is the target for the message. If you choose \fIroom\fP type it +has to be a conference room name or complete ID. A single room without +any @ in it will get sent to the configured conference server. If you +choose the \fIchat\fP type the JID has to be the jabber ID of the user +to receive the message, either just the user part which will get added +the jabber server as domain part, or a full jabber ID. +.TP +.B message +The final part is the message that will get sent. At the moment it will +be put into the body as plain text. Please notice that you will have to +quote or escape special characters in the message like white space. +.SH FILES +.TP +.B /etc/nagzillac/nagzillac.cfg +The configuration file for the nagzilla client. Please see the comments +in the file for informations on what to tweak. +.SH EXAMPLE +The following sends a chat message to the rhonda user on the default +server: + +.RS +nagzillac "chat^rhonda^hi there" +.RE + +This will send a message to a conference room on a different server: + +.RS +nagzillac "room^monitor@jabber.doma.in^alert \- do something" +.RE + +.SH SEE ALSO +.BR nagzillad (1). +.br +.SH AUTHOR +nagzillac was written by Bill Mathews. +.PP +This manual page was written by Gerfried Fuchs +for the Debian project (and may be used by others). --- nagzilla-1.5.5-1.orig/debian/nagzillad.1 +++ nagzilla-1.5.5-1/debian/nagzillad.1 @@ -0,0 +1,48 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH NAGZILLAD 1 "2009-06-03" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +nagzillad \- jabber relay bot daemon +.SH SYNOPSIS +.B nagzillad +.SH DESCRIPTION +This manual page documents briefly the +.B nagzillad +command. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBnagzillad\fP is a daemon that accepts a message to relay to either a +jabber conference room or a specific jabber user. It takes no options +but instead reads its configuration from its configuration file. +.SH FILES +.TP +.B /etc/nagzillad/nagzillad.cfg +The configuration file for the nagzilla daemon. Please see the comments +in the file for informations on what to tweak. +.TP +.B /var/log/nagzilla/nagzillad.log +The logfile for the nagzilla daemon. +.SH SEE ALSO +.BR nagzillac (1). +.br +.SH AUTHOR +nagzillad was written by Bill Mathews. +.PP +This manual page was written by Gerfried Fuchs +for the Debian project (and may be used by others). --- nagzilla-1.5.5-1.orig/debian/nagzilla.manpages +++ nagzilla-1.5.5-1/debian/nagzilla.manpages @@ -0,0 +1,2 @@ +debian/nagzillac.1 +debian/nagzillad.1 --- nagzilla-1.5.5-1.orig/debian/nagzilla.nagzillad.init +++ nagzilla-1.5.5-1/debian/nagzilla.nagzillad.init @@ -0,0 +1,293 @@ +#!/bin/sh +# +# Example init.d script with LSB support. +# +# Please read this init.d carefully and modify the sections to +# adjust it to the program you want to run. +# +# Copyright (c) 2007 Javier Fernandez-Sanguino +# +# This is free software; you may 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, +# or (at your option) any later version. +# +# This 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 with +# the Debian operating system, in /usr/share/common-licenses/GPL; if +# not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA +# +### BEGIN INIT INFO +# Provides: nagzilla +# Required-Start: $network $local_fs +# Required-Stop: +# Should-Start: $named +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: nagzilla jabber bot +# Description: Receives messages to send to a given jabber user or +# room +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/bin/nagzillad +NAME=nagzillad +DESC="nagzilla jabber bot" + +PIDFILE=/var/run/$NAME.pid + +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +# Default options, these can be overriden by the information +# at /etc/default/$NAME +DAEMON_OPTS="" # Additional options given to the server + +DIETIME=10 # Time to wait for the server to die, in seconds + # If this value is set too low you might not + # let some servers to die gracefully and + # 'restart' will not work + +#STARTTIME=2 # Time to wait for the server to start, in seconds + # If this value is set each time the server is + # started (on start or restart) the script will + # stall to try to determine if it is running + # If it is not set and the server takes time + # to setup a pid file the log message might + # be a false positive (says it did not start + # when it actually did) + +#DAEMONUSER=nagzilla # Users to run the daemons as. If this value + # is set start-stop-daemon will chuid the server + +# Include defaults if available +if [ -f /etc/default/$NAME ] ; then + . /etc/default/$NAME +fi + +# Use this if you want the user to explicitly set 'RUN' in +# /etc/default/ +if [ "x$RUN" != "xyes" ] ; then + log_failure_msg "$NAME disabled, please adjust the configuration to your needs " + log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it." + exit 0 +fi + +# Check that the user exists (if we set a user) +# Does the user exist? +if [ -n "$DAEMONUSER" ] ; then + if getent passwd | grep -q "^$DAEMONUSER:"; then + # Obtain the uid and gid + DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` + DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` + else + log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." + exit 1 + fi +fi + + +set -e + +running_pid() { +# Check if a given process pid's cmdline matches a given name + pid=$1 + name=$2 + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # Is this the expected server + [ "$cmd" != "$name" ] && return 1 + return 0 +} + +running() { +# Check if the process is running looking at /proc +# (works for all users) + + # No pidfile, probably no daemon present + [ ! -f "$PIDFILE" ] && return 1 + pid=`cat $PIDFILE` + running_pid $pid $DAEMON || return 1 + return 0 +} + +start_server() { +# Start the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + start_daemon -p $PIDFILE $DAEMON $DAEMON_OPTS + errcode=$? + else +# if we are using a daemonuser then change the user id + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $DAEMONUSER \ + --exec $DAEMON -- $DAEMON_OPTS + errcode=$? + fi + return $errcode +} + +stop_server() { +# Stop the process using the wrapper + if [ -z "$DAEMONUSER" ] ; then + killproc -p $PIDFILE $DAEMON + errcode=$? + else +# if we are using a daemonuser then look for process that match + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --user $DAEMONUSER \ + --exec $DAEMON + errcode=$? + fi + + return $errcode +} + +reload_server() { + [ ! -f "$PIDFILE" ] && return 1 + pid=pidofproc $PIDFILE # This is the daemon's pid + # Send a SIGHUP + kill -1 $pid + return $? +} + +force_stop() { +# Force the process to die killing it manually + [ ! -e "$PIDFILE" ] && return + if running ; then + kill -15 $pid + # Is it really dead? + sleep "$DIETIME"s + if running ; then + kill -9 $pid + sleep "$DIETIME"s + if running ; then + echo "Cannot kill $NAME (pid=$pid)!" + exit 1 + fi + fi + fi + rm -f $PIDFILE +} + + +case "$1" in + start) + log_daemon_msg "Starting $DESC " "$NAME" + # Check if it's running first + if running ; then + log_progress_msg "apparently already running" + log_end_msg 0 + exit 0 + fi + if start_server ; then + # NOTE: Some servers might die some time after they start, + # this code will detect this issue if STARTTIME is set + # to a reasonable value + [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time + if running ; then + # It's ok, the server started and is running + log_end_msg 0 + else + # It is not running after we did start + log_end_msg 1 + fi + else + # Either we could not start it + log_end_msg 1 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + if running ; then + # Only stop the server if we see it running + errcode=0 + stop_server || errcode=$? + log_end_msg $errcode + else + # If it's not running don't do anything + log_progress_msg "apparently not running" + log_end_msg 0 + exit 0 + fi + ;; + force-stop) + # First try to stop gracefully the program + $0 stop + if running; then + # If it's still running try to kill it more forcefully + log_daemon_msg "Stopping (force) $DESC" "$NAME" + errcode=0 + force_stop || errcode=$? + log_end_msg $errcode + fi + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + errcode=0 + stop_server || errcode=$? + # Wait some sensible amount, some server need this + [ -n "$DIETIME" ] && sleep $DIETIME + start_server || errcode=$? + [ -n "$STARTTIME" ] && sleep $STARTTIME + running || errcode=$? + log_end_msg $errcode + ;; + status) + + log_daemon_msg "Checking status of $DESC" "$NAME" + if running ; then + log_progress_msg "running" + log_end_msg 0 + else + log_progress_msg "apparently not running" + log_end_msg 1 + exit 1 + fi + ;; + # Use this if the daemon cannot reload + reload) + log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon" + log_warning_msg "cannot re-read the config file (use restart)." + ;; + # And this if it can + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # log_daemon_msg "Reloading $DESC configuration files" "$NAME" + # if running ; then + # reload_server + # if ! running ; then + # Process died after we tried to reload + # log_progress_msg "died on reload" + # log_end_msg 1 + # exit 1 + # fi + # else + # log_progress_msg "server is not running" + # log_end_msg 1 + # exit 1 + # fi + #;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 --- nagzilla-1.5.5-1.orig/debian/copyright +++ nagzilla-1.5.5-1/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Gerfried Fuchs on +Mon, 18 May 2009 13:32:33 +0200. + +It was downloaded from + +Upstream Author: + Hurricane Labs, LLC + Bill Mathews + +Copyright: + Copyright 2006-2009 Hurricane Labs, LLC + +License: + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + +The Debian packaging is Copyright 2009 by +Gerfried Fuchs and is licensed under the BSD license. +See /usr/share/common-licenses/BSD for the full text of it. + +On Debian GNU/Linux systems, the complete text of the GNU General Public +License version 2 can be found in `/usr/share/common-licenses/GPL-2', +later versions of them can be found in the same directory. --- nagzilla-1.5.5-1.orig/debian/nagzilla.nagzillad.default +++ nagzilla-1.5.5-1/debian/nagzilla.nagzillad.default @@ -0,0 +1,8 @@ +# Defaults for nagzilla initscript +# sourced by /etc/init.d/nagzilla +# installed at /etc/default/nagzilla by the maintainer scripts + +# Configure nagzillad editing /etc/nagzillad and /etc/nagzillac files +# (nagzillad.cfg and nagzillac.cfg are the principal config files) +# Modify to RUN="yes" when you are ready +RUN="no" --- nagzilla-1.5.5-1.orig/debian/patches/series +++ nagzilla-1.5.5-1/debian/patches/series @@ -0,0 +1,5 @@ +# +03_rawmessage +04_fix-ARGV0 +05_fix-logrotate-file +06_adjust-config-files --- nagzilla-1.5.5-1.orig/debian/patches/03_rawmessage +++ nagzilla-1.5.5-1/debian/patches/03_rawmessage @@ -0,0 +1,24 @@ +Author: Gerfried Fuchs vim:ft=diff: +Description: Message bodies starting off with ^< will get considered to + be RawXML (without the leading ^) + +Index: nagzilla-1.5.5-1/nagzillad.pl +=================================================================== +--- nagzilla-1.5.5-1.orig/nagzillad.pl ++++ nagzilla-1.5.5-1/nagzillad.pl +@@ -228,6 +228,15 @@ while (1) { + + } + ++ # dirty hack to allow RawXML: message text starting off with ^<, ++ # strip off the ^ ++ if ($mess =~ /^\^write("--RawXML-- $style for $roomy ", 10); ++ $message->RemoveBody(); ++ $mess =~ s/^\^InsertRawXML($mess); ++ } ++ + #Send message from STDIN -- probably should add some error handling + #There is some bug in at least ejabberd that causes messages to + #be sent "offline". They get flushed on nagzilla restart --- nagzilla-1.5.5-1.orig/debian/patches/04_fix-ARGV0 +++ nagzilla-1.5.5-1/debian/patches/04_fix-ARGV0 @@ -0,0 +1,16 @@ +Author: Gerfried Fuchs vim:ft=diff: +Description: Fix ARGV[0] to not contain the interpreter + +Index: nagzilla-1.5.5-1/nagzillad.pl +=================================================================== +--- nagzilla-1.5.5-1.orig/nagzillad.pl ++++ nagzilla-1.5.5-1/nagzillad.pl +@@ -21,6 +21,8 @@ $CONFDIR = "/etc/nagzillad"; + + # DO NOT EDIT ANYTHING BEYOND THIS POINT!! + ++$0.=''; # so that the init script is able to detect the process ++ + ##############Config File Setup##################### + Config::Simple->import_from('nagzillad.cfg', \%Config); + $cfg = new Config::Simple("$CONFDIR/nagzillad.cfg"); --- nagzilla-1.5.5-1.orig/debian/patches/05_fix-logrotate-file +++ nagzilla-1.5.5-1/debian/patches/05_fix-logrotate-file @@ -0,0 +1,21 @@ +Author: Gerfried Fuchs vim:ft=diff: +Description: Create logrotate files with nagzilla user writeable + +Index: nagzilla-1.5.5-1/nagzillad +=================================================================== +--- nagzilla-1.5.5-1.orig/nagzillad ++++ nagzilla-1.5.5-1/nagzillad +@@ -1,11 +1,11 @@ +-/var/log/nagzillad.log { ++/var/log/nagzilla/nagzillad.log { + daily + missingok + rotate 356 + compress + delaycompress + notifempty +- create 640 root adm ++ create 640 nagzilla adm + sharedscripts + postrotate + /etc/init.d/nagzillad restart > /dev/null --- nagzilla-1.5.5-1.orig/debian/patches/06_adjust-config-files +++ nagzilla-1.5.5-1/debian/patches/06_adjust-config-files @@ -0,0 +1,48 @@ +Author: Gerfried Fuchs vim:ft=diff: +Description: Adjust config files to have some more sensible defaults + +Index: nagzilla-1.5.5-1/nagzillac.cfg +=================================================================== +--- nagzilla-1.5.5-1.orig/nagzillac.cfg ++++ nagzilla-1.5.5-1/nagzillac.cfg +@@ -1,7 +1,7 @@ + #nagzillac configuration file + + #Nagzilla server to connect to +-NagzillaServer = ++NagzillaServer = 127.0.0.1 + #Nagzilla Server port to use + NagzillaPort = 49776 + +Index: nagzilla-1.5.5-1/nagzillad.cfg +=================================================================== +--- nagzilla-1.5.5-1.orig/nagzillad.cfg ++++ nagzilla-1.5.5-1/nagzillad.cfg +@@ -3,22 +3,22 @@ + + #Nagzillad Server Settings + #IP to bind to +-BindAddr = ++BindAddr = 127.0.0.1 + #Port to bind to + BindPort = 49776 + #Username to run as +-BindUser = nobody ++BindUser = nagzilla + #Run as daemon, use 1 - to run in foreground use 0 + Daemon = 1 + #To log server starts and stop and messages sent use 1 + To_Log = 1 + #Where would you like to log to today? +-Log_Directory = /var/log ++Log_Directory = /var/log/nagzilla + #Default error log level + Error_Log_Level = 6 + +-#Nagzillad Access Control +-AllowedIPAddr = {comma separated list of IP addresses allowed to connect} ++#Nagzillad Access Control {comma separated list of IP addresses allowed to connect} ++AllowedIPAddr = 127.0.0.1 + + + #Jabber Server Settings