#!/bin/bash export TEXTDOMAIN="zero-jclic" MSG_ERROR_MYSQL=$(gettext "You must install and run mysql") MSG_NOCONFIGURE=$(gettext "Leaving unconfigured") MSG_PASSWD=$(gettext "Administrator password for Jclic Reports: /etc/lliurex-sgbd/jclic.sgbd") zero-center add-pulsating-color zero-jclic apt-get update apt-get -y install lliurex-sgbd if [ $? -ne 0 ]; then zenity --info --text="$MSG_NOCONFIGURE" zero-center remove-pulsating-color zero-jclic exit 0 fi #Testear el mysql RESULT=$(mysql_root_passwd -a) if [ "$RESULT" = "NO" ]; then zenity --error --text "$MSG_ERROR_MYSQL" zero-center remove-pulsating-color zero-jclic exit 0 fi #Inicializar mysql mysql_root_passwd -i #Crear la base de datos y el usuario, si no existe resp=$(lliurex-sgbd --db_is_present jclic ) if [ "$resp" = "NO" ] ; then lliurex-sgbd --install jclic else lliurex-sgbd --upgrade jclic fi #Crear un fichero de inicialización touch /etc/.jclic.conf cat > /etc/.jclic.conf << EOF ********************************************* Creado al configurar con zero-center el jclic ********************************************* EOF zenity --warning --text="$MSG_PASSWD" #Deshabilitar después de configurar zero-center remove-pulsating-color zero-jclic zero-center set-configured zero-jclic exit 0