From 30b41bd953ea7d025eec1e41003de193034d69c8 Mon Sep 17 00:00:00 2001 From: David Rousselie Date: Fri, 30 Nov 2007 18:17:59 +0100 Subject: [PATCH] Complete Debian packaging darcs-hash:20071130171759-86b55-eb1275573723a4caec19126f94ff645d7aa515d3.gz --- conf/jmc.conf | 1 + debian/changelog | 7 +++++++ debian/docs | 1 + debian/init.d | 17 +++++++++++------ debian/postinst | 2 ++ debian/{jmc-default => python-jmc.default} | 7 +++++-- debian/python-jmc.install | 1 + debian/rules | 3 +++ src/jmc/tests/jmc.conf | 1 + 9 files changed, 32 insertions(+), 8 deletions(-) rename debian/{jmc-default => python-jmc.default} (62%) create mode 100644 debian/python-jmc.install diff --git a/conf/jmc.conf b/conf/jmc.conf index be4d26b..31a2e12 100644 --- a/conf/jmc.conf +++ b/conf/jmc.conf @@ -25,6 +25,7 @@ pid_file: /var/run/jabber/jmc.pid welcome_message: "Welcome to Jabber Mail Component" # a comma separated list of JIDs admins: admin@localhost +log_file: /var/log/jabber/jmc.log [jmc] mail_default_encoding: iso-8859-1 diff --git a/debian/changelog b/debian/changelog index 4a2780c..f499775 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +jmc (0.3) unstable; urgency=low + + * Global refactoring (Splitted and now use python-jcl) + * SMTP email sending support + + -- David Rousselie Thu, 29 Nov 2007 08:23:30 +0100 + jmc (0.2.3) unstable; urgency=low * keep boolean settings with tkabber diff --git a/debian/docs b/debian/docs index 724e084..754397a 100644 --- a/debian/docs +++ b/debian/docs @@ -1,2 +1,3 @@ README TODO +conf/jmc.conf diff --git a/debian/init.d b/debian/init.d index ad2a352..9d62b38 100755 --- a/debian/init.d +++ b/debian/init.d @@ -11,15 +11,15 @@ # PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/jmc +DAEMON=/usr/bin/jmc NAME=jmc DESC=jmc test -x $DAEMON || exit 0 # Include jmc defaults if available -if [ -f /etc/default/jmc ] ; then - . /etc/default/jmc +if [ -f /etc/default/python-jmc ] ; then + . /etc/default/python-jmc fi set -e @@ -27,14 +27,19 @@ set -e case "$1" in start) echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + start-stop-daemon --start --quiet --chuid jabber \ + --background --pidfile $PID_FILE \ --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON + if [ -f $PID_FILE ]; then + start-stop-daemon --stop --quiet --user jabber \ + --pidfile $PID_FILE + else + echo "$PID_FILE does not exist. JMC seems to be not started" + fi echo "$NAME." ;; #reload) diff --git a/debian/postinst b/debian/postinst index 5730b65..6db98f9 100755 --- a/debian/postinst +++ b/debian/postinst @@ -42,6 +42,8 @@ case "$1" in fi chown jabber:daemon /var/spool/jabber chown jabber:daemon /var/run/jabber + chown jabber:daemon /var/log/jabber + chown jabber:daemon /etc/jabber ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/jmc-default b/debian/python-jmc.default similarity index 62% rename from debian/jmc-default rename to debian/python-jmc.default index ad28540..31d8331 100644 --- a/debian/jmc-default +++ b/debian/python-jmc.default @@ -4,7 +4,10 @@ ENABLE="false" +# Must be the same value as in jmc.conf +PID_FILE="/var/run/jabber/jmc.pid" + # Additional options that are passed to the Daemon. # use this line to activate debug -#DAEMON_OPTS="-D" -DAEMON_OPTS="" +#DAEMON_OPTS="-d" +DAEMON_OPTS="-c /etc/jabber/jmc.conf" diff --git a/debian/python-jmc.install b/debian/python-jmc.install new file mode 100644 index 0000000..0481e39 --- /dev/null +++ b/debian/python-jmc.install @@ -0,0 +1 @@ +conf/jmc.conf etc/jabber/ diff --git a/debian/rules b/debian/rules index 622722b..7b0b3d7 100755 --- a/debian/rules +++ b/debian/rules @@ -42,6 +42,9 @@ binary-indep: build install dh_testdir -i dh_testroot -i dh_pycentral -i + dh_install -i + dh_installinit -i + dh_install dh_installdocs -i dh_installdirs -i dh_installexamples -i diff --git a/src/jmc/tests/jmc.conf b/src/jmc/tests/jmc.conf index f05c78c..9671225 100644 --- a/src/jmc/tests/jmc.conf +++ b/src/jmc/tests/jmc.conf @@ -17,6 +17,7 @@ db_url: %(type)s://%(host)s%(name)s [component] pid_file: /var/run/jabber/test_jmc.pid +log_file: /var/log/jabber/jmc.log [jmc] mail_default_encoding: test_iso-8859-1