X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fdebian%2Fcitadel-server.postinst;h=b07a655f510f3b1ee2325b94d1c579d5358104c9;hb=ccf70a1258a8cbb81b66e0e1cea7b5049a8efa07;hp=5a1592a4ddfc155ff658d7b27957110a796114fc;hpb=223827e1966143485e948a9a4023992eda636b94;p=citadel.git diff --git a/citadel/debian/citadel-server.postinst b/citadel/debian/citadel-server.postinst index 5a1592a4d..b07a655f5 100644 --- a/citadel/debian/citadel-server.postinst +++ b/citadel/debian/citadel-server.postinst @@ -21,6 +21,7 @@ case "$1" in move_file /var/run/refcount_adjustments.dat /etc/citadel/data/refcount_adjustments.dat move_file /etc/citadel/citadel.control /var/lib/citadel/data/citadel.control move_file /etc/citadel/citadel.config /var/lib/citadel/data/citadel.config + invoke-rc.d citadel start db_get citadel/Administrator && admin="$RET" db_get citadel/ServerIPAddress && ip_addr="$RET" @@ -36,34 +37,23 @@ case "$1" in export CITADEL='/var/run/citadel' export CITADEL_PORT=504 export CITADEL_INSTALLER=yes - export CITADEL_UID=`grep citadel /etc/passwd | cut -d : -f 3` + export CITADEL_UID=`grep ^citadel: /etc/passwd | cut -d : -f 3` export ACT_AS_MTA=no export SYSADMIN_NAME=$admin export CREATE_XINETD_ENTRY=no export CREATE_INITTAB_ENTRY=no export NO_INIT_SCRIPTS=yes -#This is not debian conformant, and uniq to the citadel.org debs. - export ALTER_ETC_SERVICES=yes -# - if test -S /var/run/citadel/citadel.socket; then - /usr/sbin/sendcommand "DOWN" - fi - while test -S /var/run/citadel/citadel.socket; do - sleep 1 - done - if test ! -f /var/lib/citadel/data/citadel.control -a -f /etc/citadel/citadel.control; then - mv /etc/citadel/citadel.control /var/lib/citadel/data/ - mv /etc/citadel/citadel.config /var/lib/citadel/data/ - fi + while test ! -S /var/run/citadel/citadel-admin.socket; do + sleep 1 + echo -n : + done echo -n "applying your settings.... " /usr/lib/citadel-server/setup -q echo "done" - # we're in a fresh install, so we send the welcome message. + # this is a new installation if test -z "$2"; then - echo "migrating mail aliases from other mailers" - /usr/lib/citadel-server/migrate_aliases.sh /etc/citadel/mail.aliases i=0; while test ! -S /var/run/citadel/lmtp.socket -a "$i" -lt "10"; do sleep 1 @@ -74,7 +64,7 @@ case "$1" in 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 FROM=nobody@example.com 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"; @@ -86,14 +76,6 @@ case "$1" in fi fi - if test -S /var/run/citadel/citadel.socket; then - /usr/sbin/sendcommand "DOWN" - fi - - while test -S /var/run/citadel/citadel.socket; do - sleep 1 - done - db_stop ;;