* send welcome mail on first debian package installation.
authorWilfried Göesgens <willi@citadel.org>
Fri, 5 Jan 2007 00:02:09 +0000 (00:02 +0000)
committerWilfried Göesgens <willi@citadel.org>
Fri, 5 Jan 2007 00:02:09 +0000 (00:02 +0000)
citadel/Makefile.in
citadel/debian/changelog
citadel/debian/citadel-server.install
citadel/debian/citadel-server.postinst
citadel/debian/rules
citadel/sendwelcomemail.sh

index f90cb38c3ac10a7885fbe7f2e0ac40bae6d90c3c..66148adaaf181c4aa6af94f6b4020bb38f9c771e 100644 (file)
@@ -281,7 +281,7 @@ install-exec: all
                        $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i; \
                fi \
        done
-       @for i in utilsmenu database_cleanup.sh citadel-openldap.schema ; do \
+       @for i in utilsmenu database_cleanup.sh citadel-openldap.schema; do \
                if test -f $(srcdir)/$$i; then \
                        echo $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(prefix)/$$i; \
                        $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(prefix)/$$i; \
index 94c20288eb1a9bc4098453c8273d9783f5c3e99f..bdf93116e36bff6ae4db950f03c56cd1c0a2522b 100644 (file)
@@ -1,3 +1,10 @@
+citadel (7.03-1) unstable; urgency=low
+       
+  * update to actual Citadel SVN. many new features. see Packages changelog.
+
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Fri, 05 Jan 2007 00:12:00 +0100
+       
+
 citadel (7.02-2) unstable; urgency=low
 
   * Initial Debian release
index 84438bf2326c82edcd3e77f676992badb8567a4c..862eb1d3e2aef09cd8189b0f6f0ac201cda2dcb4 100644 (file)
@@ -12,3 +12,5 @@ usr/sbin/msgform
 usr/sbin/sendcommand
 usr/sbin/userlist
 usr/share/doc/citadel-server/database_cleanup.sh
+usr/share/doc/citadel-server/welcomemail.txt
+usr/share/doc/citadel-server/welcomemail.html
index d01f2b88f4acd0e35261e7bd11a01ffdbf387ceb..7498eb6fee6736709ed4bbac8033a12efa055972 100644 (file)
@@ -1,6 +1,5 @@
 #!/bin/sh
 # postinst script for citadel-server
-
 set -e
 
 # source debconf stuff
@@ -49,6 +48,23 @@ case "$1" in
         echo "applying your settings."
         /usr/lib/citadel-server/setup -q
 
+# we're in a fresh install, so we send the welcome message.
+       if test -z "$2"; then
+           export SEPERATOR=2600908b3f21ae7f692b973ed26e212d
+           export WELCOMEHTML=/usr/share/doc/citadel-server/welcomemail.html
+           export WELCOMETXT=/usr/share/doc/citadel-server/welcomemail.txt
+           export FROM=room_citadel_stats@uncensored.citadel.org
+           export TO=room_lobby
+           (
+               printf "MIME-Version: 1.0\r\nContent-Type: multipart/alternative; \r\n boundary=$SEPERATOR\r\n\r\nThis is a multi-part message in MIME format.\r\n\r\n--$SEPERATOR\r\nContent-Type: text/plain; charset=utf-8\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n"; 
+               cat $WELCOMETXT
+               printf "\r\n\r\n--$SEPERATOR\r\nContent-Type: text/html; charset=US-ASCII\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n"
+               cat $WELCOMEHTML; 
+               printf "\r\n\r\n--$SEPERATOR--\r\n\r\n") | \
+                   /usr/sbin/citmail -bm -r "$FROM" "$TO"
+       fi
+       
+
         if test -S /var/run/citadel/citadel.socket; then 
             /usr/sbin/sendcommand "DOWN"
         fi
index 48711d6538d8371f225229338d5281e4a39f307f..ef1bb638d199c382837b3bf3675278e0ff0e87d3 100755 (executable)
@@ -52,7 +52,7 @@ build-indep-stamp: configure-stamp
 clean:
        dh_testdir
        dh_testroot
-       rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
+       rm -f build-arch-stamp build-indep-stamp configure-stamp
 
        -$(MAKE) distclean
 
@@ -75,7 +75,10 @@ install-arch:
        dh_clean -k -s 
        dh_installdirs -s
 
-       $(MAKE) DESTDIR=$(DEB_DESTDIR) install-exec-new install-data-new
+       $(MAKE) DESTDIR=$(DEB_DESTDIR) \
+               install-exec-new \
+               install-data-new \
+               install-doc-new
 
        mkdir -p $(DEB_DESTDIR)/usr/lib/citadel-server
        mv $(DEB_DESTDIR)/usr/sbin/setup \
@@ -84,6 +87,9 @@ install-arch:
        mkdir -p $(DEB_DESTDIR)/usr/share/doc/citadel-server/
        mv $(DEB_DESTDIR)/usr/share/doc/citadel-doc/database_cleanup.sh \
                $(DEB_DESTDIR)/usr/share/doc/citadel-server/
+       mv $(DEB_DESTDIR)/usr/share/doc/citadel-doc/docs/welcomemail.txt \
+               $(DEB_DESTDIR)/usr/share/doc/citadel-doc/docs/welcomemail.html \
+               $(DEB_DESTDIR)/usr/share/doc/citadel-server/
 
        dh_install -s --sourcedir=debian/tmp
 
index 74ceb4af749621367904f8d04ce6fa2f2e89fcef..f1ac8c1783cf83771905d92db877cdd5d8f8d54e 100644 (file)
@@ -2,8 +2,8 @@
 
 
 export FOO=2600908b3f21ae7f692b973ed26e212d
-export WELCOMEHTML=docs/welcomemail.html
-export WELCOMETXT=docs/welcomemail.txt
+export WELCOMEHTML=welcomemail.html
+export WELCOMETXT=welcomemail.txt
 export FROM=room_citadel_stats@uncensored.citadel.org
 export TO=room_lobby
 (