Commit c802a685 authored by Francois Marier's avatar Francois Marier
Browse files

Add debconf questions for dbtype and dbpass

parent c2f1d029
......@@ -6,17 +6,21 @@
# Decide how important it is for the user to see this message
PRIORITY=high
db_input $PRIORITY mahara/db_type || true
db_go
db_input $PRIORITY mahara/db_host || true
db_go
db_input $PRIORITY mahara/db_port || true
db_input medium mahara/db_port || true
db_go
db_input $PRIORITY mahara/db_name || true
db_go
db_input $PRIORITY mahara/db_user || true
db_go
db_input $PRIORITY mahara/db_pass|| true
db_go
db_input $PRIORITY mahara/servername || true
db_go
db_input $PRIORITY mahara/serverredirects || true
db_go
db_input $PRIORITY mahara/smtphosts || true
db_input medium mahara/smtphosts || true
db_go
......@@ -6,10 +6,12 @@
//
// Your local customizations should go into /etc/mahara/config.php
$cfg->dbtype = 'postgres8';
$cfg->dbhost = 'localhost';
$cfg->dbport = '';
$cfg->dbname = 'mahara';
$cfg->dbuser = 'mahara';
$cfg->dbpass = '';
$cfg->wwwroot = 'http://localhost/mahara/';
$cfg->smtphosts = '';
$cfg->dataroot = '/var/lib/mahara';
......
......@@ -29,12 +29,12 @@ $cfg = new StdClass;
require('config.debconf.php');
// database connection details
$cfg->dbtype = 'postgres8';
//$cfg->dbtype = 'postgres8';
//$cfg->dbhost = 'localhost';
//$cfg->dbport = 5432;
//$cfg->dbport = '';
//$cfg->dbname = 'mahara';
//$cfg->dbuser = 'mahara';
$cfg->dbpass = 'mahara';
//$cfg->dbpass = '';
//$cfg->dbprefix = '';
// wwwroot - the web-visible path to your Mahara installation
......
......@@ -27,6 +27,8 @@ APACHE_CONF_FILE=/etc/apache/conf.d/100-mahara
case "$1" in
configure)
# Configure Mahara
db_get mahara/db_type
set_config dbtype "${RET}"
db_get mahara/db_host
set_config dbhost "${RET}"
db_get mahara/db_port
......@@ -35,6 +37,8 @@ case "$1" in
set_config dbname "${RET}"
db_get mahara/db_user
set_config dbuser "${RET}"
db_get mahara/db_pass
set_config dbpass "${RET}"
db_get mahara/servername
set_config wwwroot "http://${RET}/"
db_get mahara/smtphosts
......
......@@ -27,6 +27,8 @@ APACHE_CONF_FILE=/etc/apache2/sites-available/mahara
case "$1" in
configure)
# Configure Mahara
db_get mahara/db_type
set_config dbtype "${RET}"
db_get mahara/db_host
set_config dbhost "${RET}"
db_get mahara/db_port
......@@ -35,6 +37,8 @@ case "$1" in
set_config dbname "${RET}"
db_get mahara/db_user
set_config dbuser "${RET}"
db_get mahara/db_pass
set_config dbpass "${RET}"
db_get mahara/servername
set_config wwwroot "http://${RET}/"
db_get mahara/smtphosts
......
Template: mahara/db_type
Type: select
Default: postgres8
Choices: postgres8, mysql5
Description: Database type:
What type of database should be used for the Mahara site
Template: mahara/db_host
Type: string
Default:
......@@ -24,6 +31,13 @@ Default: mahara
Description: Database username:
Which username should be used to connect to the Mahara database
Template: mahara/db_pass
Type: string
Default:
Description: Database password:
Which password is associated with the given username
You can leave this blank if you are not using password authentication.
Template: mahara/servername
Type: string
Default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment