Changeset 4890


Ignore:
Timestamp:
May 24, 2017, 1:41:48 PM (22 months ago)
Author:
joamuran
Message:

fixed postinst

Location:
lliurex-jocomunico/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lliurex-jocomunico/trunk/fuentes/debian/lliurex-jocomunico.postinst

    r4882 r4890  
    44
    55
     6function setvars(){
     7    # Getting .my.cnf data
     8    awk -F ' *= *' '{ if ($1 ~ /^\[/) section=$1; else if ($1 !~ /^$/) print $1 section "=" "\"" $2 "\"" }' $1
     9}
     10
     11
    612case $1 in
    713       
    814        configure)
     15   
     16        #sed "s/'password' => 'root'/'password' => 'llx_pass'/;s/'database' => 'jocomunicoapp'/'database' => 'jocomunicolliureX'/;" /srv/svn/xenial/lliurex-jocomunico/trunk/fuentes/lliurex-jocomunico.install/opt/jocomunico/application/config/database.php > eixida.txt
     17   
     18        DB_CONF_FILE=/opt/jocomunico/application/config/database.php;
     19        DATABASE=jocomunicolliureX;
     20        DB_TMP=/tmp/db_tmp.php;
     21
     22        # call to setvars
     23        setvars /root/.my.cnf  | grep "\[mysql\]" > /tmp/mysqldatainfo
     24
     25        # source from mysqldatainfo
     26        . /tmp/mysqldatainfo
     27
     28        sed "s/'password' => 'root'/'password' => '$password'/;s/'database' => 'jocomunicoapp'/'database' => '$DATABASE'/;s/'username' => 'root'/'username' => '$user'/" $DB_CONF_FILE >  $DB_TMP
     29       
     30        # When finished, let's set right files
     31        rm /tmp/mysqldatainfo
     32        cp $DB_TMP $DB_CONF_FILE
     33        rm $db_TMP
     34
     35   
     36   
    937                # mp3 dirs permissions
    1038                chown root:www-data /opt/jocomunico/mp3
  • lliurex-jocomunico/trunk/fuentes/lliurex-jocomunico.install/opt/jocomunico/application/config/database.php

    r4883 r4890  
    7979        'username' => 'root',
    8080        'password' => 'root',
    81         //'database' => 'jocomunicoapp',
    82     'database' => 'jocomunicolliureX', //[LLX]: Access to LliureX Database (just for test, can be jocomunicoapp)
     81        'database' => 'jocomunicoapp',
    8382        'dbdriver' => 'mysqli',
    8483        'dbprefix' => '',
     
    9695        'save_queries' => TRUE
    9796);
     97
Note: See TracChangeset for help on using the changeset viewer.