source: moodle/trunk/fuentes/debian/config @ 136

Last change on this file since 136 was 136, checked in by mabarracus, 3 years ago

Ported code to xenial

  • Property svn:executable set to *
File size: 937 bytes
Line 
1#!/bin/sh
2
3set -e
4#set -x
5
6. /usr/share/debconf/confmodule
7
8if [ -f /etc/moodle/config.php ]; then
9        TEMPFILE=`tempfile`
10        cp /etc/moodle/config.php $TEMPFILE
11        #Change short tags into long tags
12        sed  -i '1 s/<?$/<?php/' $TEMPFILE
13        #We don't want config.php to include more files and possibly execute some code
14        sed  -i 's/include_once/\/\/include_once/' $TEMPFILE
15        #We don't want it to display any irrelevant messages
16        sed  -i 's/echo/\/\/echo/' $TEMPFILE
17       
18        dbc_load_include="php:$TEMPFILE"
19        dbc_load_include_args="-dCFG->dbname -sCFG->dbhost -pCFG->dbpass -uCFG->dbuser -tCFG->dbtype"
20
21fi
22
23db_input critical moodle/www || true
24db_go || true
25db_get moodle/www
26www="$RET"
27if [ ! `echo "$www" | egrep "^http"` ]; then
28        www="http://$www"
29        db_set moodle/www "$www"
30fi
31
32#       dbc_debug=1
33dbc_dbtypes="mysql, pgsql"
34dbc_authmethod_user="password"
35dbc_first_version="1.9.8-1"
36. /usr/share/dbconfig-common/dpkg/config
37dbc_go moodle $@
38
Note: See TracBrowser for help on using the repository browser.