Changeset 3372


Ignore:
Timestamp:
Jan 19, 2017, 1:55:50 PM (3 years ago)
Author:
mabarracus
Message:

wip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-analytics-server/trunk/fuentes/debian/postinst

    r3370 r3372  
    4141
    4242    ASK="no"
    43 
     43   
    4444#CHECK OLD CONFIG
    4545    if [ ! -d "/etc/lliurex-analytics-server" ]; then
    4646        ASK="yes"
     47        echo "creating config directory"
    4748        mkdir /etc/lliurex-analytics-server
    4849    else
     
    5657                    pass="${PASS}"
    5758                    ASK="no"
     59                    echo "using user & pass from config_db file"
    5860                else
     61                    echo "wrong user & pass into config_db file"
    5962                    ASK="yes"
    6063                fi
    6164            else
     65                echo "user & pass not detected in config_db file"
    6266                ASK="yes"
    6367            fi
    6468        else
     69            echo "config_db file not found"
    6570            ASK="yes"
    6671        fi
     
    6873
    6974# ASK QUESTIONS
     75    print_info="no"
    7076    if [ "${ASK}" = "yes" ]; then
    7177        ask_question 'Desea configurar la base de datos analytics?'
     
    8894            rootpass=$input
    8995        else
    90             echo
    91             echo "To import database schema use:"
    92             echo ""
    93             echo "echo \"create user '<user>'@'%' identified by '<password>';\" | mysql -u root -p<root_password>"
    94             echo "echo \"grant all privileges on analytics.* to '<user>'@'%';\" | mysql -u root -p<root_password>"
    95             echo "echo \"flush privileges; \" | mysql -u root -p<root_password>"
    96             echo "mysql -u <user> -p<root_password> < /usr/lib/analytics-server/analytics.sql"
    97             echo "After that, edit /usr/lib/analytics-server/analytics/config.php"
    98             echo
    99             echo
     96            print_info="yes"
    10097        fi
    10198    else
     
    162159    service apache2 restart
    163160
     161    if [ "${print_info}" = "yes" ]; then
     162            echo
     163            echo "To import database schema use:"
     164            echo ""
     165            echo "echo \"create user '<user>'@'%' identified by '<password>';\" | mysql -u root -p<root_password>"
     166            echo "echo \"grant all privileges on analytics.* to '<user>'@'%';\" | mysql -u root -p<root_password>"
     167            echo "echo \"flush privileges; \" | mysql -u root -p<root_password>"
     168            echo "mysql -u <user> -p<root_password> < /usr/lib/analytics-server/analytics.sql"
     169            echo "After that, edit /usr/lib/analytics-server/analytics/config.php"
     170            echo
     171            echo
     172    fi
    164173    ;;
    165174
Note: See TracChangeset for help on using the changeset viewer.