X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fdebian%2Fcitadel-server.postinst;h=b07a655f510f3b1ee2325b94d1c579d5358104c9;hb=a2ae8dfea31fc1495e3a97b28f3ddca01f491bef;hp=1c8dc1a8fca34d4b9b1c0fed6ac88d0506c7514b;hpb=79ecdc822c9b6252e7f57eeec45cfee9faf38493;p=citadel.git diff --git a/citadel/debian/citadel-server.postinst b/citadel/debian/citadel-server.postinst index 1c8dc1a8f..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 @@ -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 ;;