* purge TinyMCE, as there is a debian package out there.
[citadel.git] / webcit / debian / citadel-webcit.postinst
1 #! /bin/sh
2 # Abort if any command returns an error value
3 set -e
4 . /usr/share/debconf/confmodule
5
6 db_version 2.0
7
8 case "$1" in
9   configure)
10         if test ! -d /var/lib/citadel/keys; then
11                 mkdir -p /var/lib/citadel/keys
12         fi
13         if test ! -d /var/run/citadel/keys; then
14                 mkdir -p /var/run/citadel/keys
15         fi
16         ln -sf /usr/share/tinymce/www /etc/citadel/www/tiny_mce
17         db_get citadel/WebcitHttpPort && http_port="$RET"
18         db_get citadel/WebcitHttpsPort && https_port="$RET"     
19
20         echo "aplying your settings"
21         echo "
22 export WEBCIT_HTTP_PORT=$http_port
23 export WEBCIT_HTTPS_PORT=$https_port
24 export WEBCIT_CITADEL_IP=127.0.0.1
25 export WEBCIT_CITADEL_PORT=504
26 export WEBCIT_LISTEN_IP=0.0.0.0
27 " >>/etc/default/webcit
28
29         db_stop
30         
31         #DEBHELPER#
32     ;;
33   abort-upgrade|abort-remove|abort-deconfigure)
34     ;;
35   *) echo "$0: didn't understand being called with '$1'" 1>&2
36      exit 1;;
37 esac
38
39 exit 0