#!/bin/bash
+export WEBCIT_`grep VERSION= configure.in |sed -e "s;';;g"`
-WEBCIT_VERSION=`grep "THIS IS" ChangeLog |head -n 1|sed "s;.* ;;"`
PACKAGE_VERSION=`cat packageversion`
DATE=`date '+%a, %d %b %Y %H:%I:00 %z'`
ACTUAL_DIR=`pwd`
-e "s;@WEBCIT_VERSION@;${WEBCIT_VERSION};" \
-e "s;@PACKAGE_VERSION@;${PACKAGE_VERSION};" \
> debian/files
- if grep -q "$WEBCIT_VERSION" debian/changelog; then
+ if grep -q "($WEBCIT_VERSION" debian/changelog; then
echo rebuilding package.
else
echo "webcit (${WEBCIT_VERSION}-${PACKAGE_VERSION}) unstable; urgency=low
* update to actual Webcit SVN. many new features. see Packages changelog.
- -- Wilfried Goesgens <w.goesgens@chaosindustries.de> $DATE
+ -- Wilfried Goesgens <citadel@outgesourced.org> $DATE
" >/tmp/webcit_changelog
cat debian/changelog >>/tmp/webcit_changelog
mv /tmp/webcit_changelog debian/changelog
+webcit (7.00-2) unstable; urgency=low
+
+ * update to actual Webcit SVN. many new features. see Packages changelog.
+
+ -- Wilfried Goesgens <citadel@outgesourced.org> Sun, 17 Dec 2006 17:05:00 +0100
+
webcit (6.71-2) unstable; urgency=low
* update to actual Webcit SVN. many new features. see Packages changelog.
- -- Wilfried Goesgens <w.goesgens@chaosindustries.de> Sat, 21 Jan 2006 19:07:00 +0100
+ -- Wilfried Goesgens <citadel@outgesourced.org> Sat, 21 Jan 2006 19:07:00 +0100
webcit (6.31-2) unstable; urgency=low
* update to actual Citadel SVN. many new features. see Packages changelog.
- -- Wilfried Goesgens <w.goesgens@chaosindustries.de> Tue, 01 Nov 2005 18:06:00 +0100
+ -- Wilfried Goesgens <citadel@outgesourced.org> Tue, 01 Nov 2005 18:06:00 +0100
webcit (6.21-1) unstable; urgency=low
* Initial release Closes: #nnnn (nnnn is the bug number of your ITP)
- -- Wilfried Goesgens <willi@jordy.home.net> Mon, 25 Jul 2005 12:46:10 +0200
+ -- Wilfried Goesgens <citadel@outgesourced.org> Mon, 25 Jul 2005 12:46:10 +0200
db_get citadel/WebcitHttpsPort && https_port="$RET"
set >/tmp/testfoo
echo "aplying your settings"
- if grep -q "webserver" /etc/inittab; then
- echo "/usr/sbin
-Yes
-$http_port
-$https_port
-No
-127.0.0.1
-504
-"|/usr/lib/citadel-webcit/setup -q
- echo "/usr/sbin
-Yes
-$http_port
-$https_port
-No
-127.0.0.1
-504
-/usr/lib/citadel-webcit/setup -q" >>/tmp/foo
- else
- echo "/usr/sbin
-" |/usr/lib/citadel-webcit/setup -q
-
- fi
+ echo "
+export WEBCIT_HTTP_PORT=$http_port
+export WEBCIT_HTTPS_PORT=$https_port
+export WEBCIT_CITADEL_IP=127.0.0.1
+export WEBCIT_CITADEL_PORT=504
+export WEBCIT_LISTEN_IP=0.0.0.0
+" >>/etc/default/webcit
+
+ update-rc.d webcit defaults >/dev/null
#### There are three sub-cases:
###if test "${2+set}" != set; then
db_purge
fi
# End automatically added section
+# Automatically added by dh_installinit
+if [ "$1" = "purge" ] ; then
+ update-rc.d webcit remove >/dev/null || exit $?
+fi
+# End automatically added section
misc:Depends=debconf (>= 0.5) | debconf-2.0
-shlibs:Depends=libc6 (>= 2.3.6-6), libssl0.9.8 (>= 0.9.8b-1), zlib1g (>= 1:1.2.1)
+shlibs:Depends=libc6 (>= 2.3.6-6), libssl0.9.8 (>= 0.9.8c-1), zlib1g (>= 1:1.2.1)
Template: citadel/WebcitHttpPort
Type: string
-Default: 2000
+Default: 2020
Description: Webcit HTTP Port
- Select the Port, which the plain HTTP webcit server should listen on.
+ Select the Port, which the plain HTTP webcit server should listen on. -1 to disable.
Template: citadel/WebcitHttpsPort
Type: string
Default: 443
Description: WebCit HTTPS port
- Select the Port, which the SSL HTTP webcit server should listen on.
+ Select the Port, which the SSL HTTP webcit server should listen on. -1 to disable.
Template: citadel/WebcitInstallnote
--with-spooldir=/var/spool/citadel \
--with-datadir=/var/lib/citadel \
--with-rundir=/var/run/citadel \
- --with-ical --with-db --with-ldap --with-zlib --with-ssl --with-libiconf --with-newt --with-included-gettext
+ --with-ical --with-db --with-ldap \
+ --with-zlib --with-ssl --with-libiconf \
+ --with-newt --with-included-gettext
touch configure-stamp
build-stamp: configure-stamp
dh_testdir
- # Add here commands to compile the package.
+# Add here commands to compile the package.
$(MAKE)
- #docbook-to-man debian/webcit.sgml > webcit.1
+#docbook-to-man debian/webcit.sgml > webcit.1
touch build-stamp
dh_testroot
rm -f build-stamp configure-stamp
- # Add here commands to clean up after the build process.
+# Add here commands to clean up after the build process.
-$(MAKE) clean
dh_clean
md5sum `find -type f |grep -v md5sums `>md5sums;
mv $(CURDIR)/debian/webcit/var/lib/citadel/www/setup \
$(CURDIR)/debian/citadel-webcit/usr/lib/citadel-webcit/
+ mv $(CURDIR)/debian/webcit/var/lib/citadel/www/ctdlsvc \
+ $(CURDIR)/debian/citadel-webcit/usr/lib/citadel-webcit/
mv $(CURDIR)/debian/webcit/var/lib/citadel/www/webserver \
$(CURDIR)/debian/citadel-webcit/usr/sbin/
binary-arch: build install
dh_testdir
dh_testroot
- dh_installchangelogs ChangeLog
+# dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
# dh_install
# dh_installemacsen
# dh_installpam
# dh_installmime
-# dh_installinit
+ dh_installinit --name=webcit
# dh_installcron
# dh_installinfo
dh_installman
--- /dev/null
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: skeleton
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Example initscript
+# Description: This file should be used to construct scripts to be
+# placed in /etc/init.d.
+### END INIT INFO
+
+# Author: Foo Bar <foobar@baz.org>
+#
+# Please remove the "Author" lines above and replace them
+# with your own name if you copy and modify this script.
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+RUNDIR=/var/run/webcit
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Citadel Groupware Webserver "
+NAME=webserver
+DAEMON=/usr/sbin/$NAME
+CTDLSVC=/usr/lib/citadel-webcit/ctdlsvc
+DAEMON_ARGS=""
+PIDFILE=$RUNDIR/$NAME.pid
+SCRIPTNAME=/etc/init.d/webcit
+SENDCOMMAND=/usr/sbin/sendcommand
+DEFAULT=/etc/default/webcit
+LOGDIR=/var/log/webcit/
+
+# 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.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+if test -f $DEFAULT; then
+ . $DEFAULT
+fi
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ #1: -p flag
+ #1: port
+ #2: ssl
+
+ # for ubuntu: check our volatile dirs.
+ if test ! -d $RUNDIR; then
+ mkdir -p $RUNDIR
+ fi
+
+ if test ! -d $LOGDIR; then
+ mkdir -p $LOGDIR
+ fi
+
+
+
+ # are we disabled?
+ if test "$1" -lt "0"; then
+ return 0
+ fi
+
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+ if $CTDLSVC $PIDFILE.$1 $DAEMON \
+ -p$@ -t$LOGDIR/access.${1}.log ; then
+ return 0
+ else
+ return 2
+ fi
+ # 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
+
+ kill `cat $PIDFILE.*`
+ rm -f $PIDFILE.*
+
+ #while test -d /proc/`cat $PIDFILE`; do
+ # /usr/bin/printf '.'
+ # /bin/sleep 1
+ #done
+
+ #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
+}
+
+#
+# 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
+ do_stop
+ do_start
+ return 0
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start $WEBCIT_HTTP_PORT $WEBCIT_CITADEL_IP $WEBCIT_CITADEL_PORT
+ do_start $WEBCIT_HTTPS_PORT $WEBCIT_CITADEL_IP $WEBCIT_CITADEL_PORT -s
+ 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
+ ;;
+ #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|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+: