root/alternc/branches/larpoux-unstable/debian/config

Revision 858, 2.2 kB (checked in by larpoux, 3 years ago)

Ticket #577


MYSQL_HOST=localhost (semble marcher beaucoup mieux)

Line 
1 #! /bin/sh
2
3 set -e
4
5 # Source debconf library.
6 . /usr/share/debconf/confmodule
7 db_title AlternC
8
9 db_reset alternc/welcomeconfirm || true
10 db_fset alternc/welcomeconfirm "seen" "false" || true
11 db_set alternc/welcomeconfirm "true" || true
12 db_input critical alternc/welcomeconfirm || true
13
14 db_go
15 # Check the answer.
16 db_get alternc/welcomeconfirm || true
17
18 if [ "$RET" = "false" ]; then
19         exit -1
20 fi
21
22 # default values for local.sh
23 MYSQL_HOST=localhost
24 MYSQL_DATABASE=alternc
25 MYSQL_USER=sysusr
26 MYSQL_PASS=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' `
27 FQDN=`hostname -f`
28 #INTERNAL_IP=`perl -e "print gethostbyname('$FQDN')"`
29 INTERNAL_IP=`/sbin/ifconfig|grep "inet addr:" | grep -v 127.0.0.1| head -1 | sed -e 's/^.*addr:\([0-9\.]*\).*$/\1/'`
30 DEFAULT_MX=`cat /etc/mailname`
31 ALTERNC_LOC='/var/alternc'
32 FQDN=`hostname -f`
33 NS1_HOSTNAME="$FQDN"
34 NS2_HOSTNAME="$FQDN"
35
36 if [ -r /etc/alternc/local.sh ]; then
37     # source the current config
38     . /etc/alternc/local.sh
39 fi
40
41 # mettre les valeurs de local.sh comme "default" pour debconf
42 db_set alternc/hostingname "$HOSTING"
43 db_set alternc/desktopname "$FQDN"
44 db_set alternc/public_ip "$PUBLIC_IP"
45 db_set alternc/internal_ip "$INTERNAL_IP"
46 db_set alternc/monitor_ip "$MONITOR_IP"
47 db_set alternc/ns1 "$NS1_HOSTNAME"
48 db_set alternc/ns2 "$NS2_HOSTNAME"
49 db_set alternc/bind_internal "$BIND_INTERNAL"
50 db_set alternc/default_mx "$DEFAULT_MX"
51 db_set alternc/mysql/host "$MYSQL_HOST"
52 db_set alternc/mysql/db "$MYSQL_DATABASE"
53 db_set alternc/mysql/user "$MYSQL_USER"
54 db_set alternc/mysql/password "$MYSQL_PASS"
55 db_set alternc/alternc_location "$ALTERNC_LOC"
56 db_set alternc/mynetwork "$SMTP_RELAY_NETWORKS"
57
58 db_input medium alternc/desktopname || true
59 db_input medium alternc/hostingname || true
60 db_input medium alternc/internal_ip || true
61 db_input medium alternc/public_ip || true
62 db_input medium alternc/default_mx || true
63 db_input medium alternc/ns1 || true
64 db_input medium alternc/ns2 || true
65 db_input medium alternc/alternc_location || true
66 db_input low alternc/mysql/host || true
67 db_input low alternc/mysql/db || true
68 db_input low alternc/mysql/user || true
69 db_input low alternc/mysql/password || true
70 db_input low alternc/monitor_ip || true
71 db_input low alternc/bind_internal || true
72 db_input low alternc/mynetwork || true
73 db_go
74
75 # vim: et sw=4
Note: See TracBrowser for help on using the browser.