wok-6.x rev 12277

ocsreports: Improve post_install
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sun Apr 15 14:25:46 2012 +0200 (2012-04-15)
parents 9eab57e3dd30
children f827295ec186
files ocsreports/receipt
line diff
     1.1 --- a/ocsreports/receipt	Sun Apr 15 14:25:08 2012 +0200
     1.2 +++ b/ocsreports/receipt	Sun Apr 15 14:25:46 2012 +0200
     1.3 @@ -20,9 +20,11 @@
     1.4  	cp -a $src/${PACKAGE} $fs/usr/share/
     1.5  	cat > $fs/etc/ocsreports/dbconfig.inc.php <<EOT
     1.6  <?php 
     1.7 -	\$_SESSION["SERVEUR_SQL"]="localhost";
     1.8 -	\$_SESSION["COMPTE_BASE"]="ocs";
     1.9 -	\$_SESSION["PSWD_BASE"]="ocs";
    1.10 +define("DB_NAME", "ocsweb");
    1.11 +define("SERVER_READ","localhost");
    1.12 +define("SERVER_WRITE","localhost");
    1.13 +define("COMPTE_BASE","ocs");
    1.14 +define("PSWD_BASE","ocs");
    1.15  ?>
    1.16  EOT
    1.17  
    1.18 @@ -70,8 +72,8 @@
    1.19  		fi
    1.20  		if ( ! mysql -Be 'show databases' | grep -q ocsweb ); then
    1.21  			echo -n "Create $PACKAGE database and schema"
    1.22 -		#	mysql -Be "create database ocsweb" ; status
    1.23 -			mysql -f -s -u root < /usr/share/$PACKAGE/files/ocsbase.sql > /dev/null 2>&1
    1.24 +			mysql -Be "create database ocsweb CHARACTER SET utf8 COLLATE utf8_bin" ; status
    1.25 +			mysql -s -u root ocsweb < /usr/share/$PACKAGE/files/ocsbase_new.sql > /dev/null 2>&1
    1.26  			# We suppose that ocs user does not exist.
    1.27  			# It may be false.
    1.28  			echo  -n "Create user ocs with password ocs"