#!/bin/bash export TEXTDOMAIN="zero-jclic" MSG_ERROR_MYSQL=$(gettext "You must install and run mysql") MSG_NOCONFIGURE=$(gettext "Leaving unconfigured") apt-get update apt-get -y install lliurex-sgbd if [ $? -ne 0 ]; then zenity --info --text="$MSG_NOCONFIGURE" exit 0 fi #Testear el mysql RESULT=$(mysql_root_passwd -a) if [ "$RESULT" = "NO" ]; then zenity --error --text "$MSG_ERROR_MYSQL" exit 0 fi #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 #Deshabilitar después de configurar zero-sqlmanager -s zero-jclic 1 exit 0