Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . jclic (0.3.2.1) Xenial; urgency=medium . * Firts xenial release Author: Juanma Navarro Mañez --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: https://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- /dev/null +++ b/jclic.install-files/etc/lliurex-sgbd/jclic.sgbd @@ -0,0 +1,35 @@ +###################################################################################### +# file name app.sgbd +# DB_NAME name of your database +# DB_USER name of your database user +# MYSQL_DATA_FILE place where you leave your mysql file to be injected on database (optional) +# INCLUDE_PATH place where leave your database include file with slash (must exist path) +# BACKUP_PATH place where leave your database automatic backup with slash (must exist path) +# USE_TEMPLATE (YES or NO) create your own template following debconf format +# you can use "lliurex-sgbd --template" to generate this template +# Copy this file modified with your own parameters in your debian package directory +# +# The include generated file will be INCLUDE_PATH/debian-db.php +# +###################################################################################### +# +# SAMPLE +# file name pmb.sgbd +# +# DB_NAME = pmb +# DB_USER = pmb_user +# MYSQL_DATA_FILE = /usr/share/pmb/www/lliurex/pmb4_base.sql +# INCLUDE_PATH = /etc/pmb/ +# BACKUP_PATH = /etc/pmb/backup/ +# USE_TEMPLATE = YES +# +###################################################################################### + +[parameters] +DB_NAME = JClicReports +DB_USER = jclic_user +DB_PASS = jclic_pwd +MYSQL_DATA_FILE = +INCLUDE_PATH = /etc/jclic/ +BACKUP_PATH = /etc/jclic/backup/ +USE_TEMPLATE = NO --- /dev/null +++ b/zero-jclic.zlaunchers/zero-jclic.app @@ -0,0 +1,18 @@ +Name=zero-jclic +Name[en]=zero-jclic +Name[es]=Configuracion del Jclic Reportserver +Name[qcv]=Configuraciò del Jclic Reportserver +Name[ca]=Configuraciò del Jclic Reportserver +Comment=Client Configuration of Jclic Reportserver +Comment[en]=Client Configuration of Jclic Reportserver +Comment[es]=Configuración del servidor de informes de Jclic +Comment[qcv]=Configuraciò del servidor de informes de Jclic +Comment[ca]=Configuraciò del servidor de informes de Jclic +Icon=jclic +Category=Services +ScriptPath=zero-jclic.zmd +Groups=sudo;admins;teachers +Using=pe +Service=True +Modal=True +Locks=zero-jclic --- /dev/null +++ b/zero-jclic.zlaunchers/zero-jclic.zmd @@ -0,0 +1,89 @@ +#!/bin/bash + +export TEXTDOMAIN="zero-jclic" +export DEBIAN_FRONTEND="noninteractive" +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") + +PACKAGE="lliurex-sgbd" + + +function test_install { + #Testeamos si el paquete esta instalado, no haciendo nada en el caso afirmativo o instalandolo en el caso negativo. + TEST=$( dpkg-query -s $1 2> /dev/null| grep Status | cut -d " " -f 4 ) + if [ "$TEST" = 'installed' ]; then + echo "Package $1 already installed, we have to uninstall it" + notify-send -t 2000 -u critical -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' "$1 is already installed in your system, now we are goig to remove it and install it again." + zero-installer remove $1 + fi + + } + + + +##############################MAIN########################### + +zero-center add-pulsating-color zero-jclic + +( +echo "# Updating Repositories...." +zero-repos-update +echo "20" +echo "Testing if package was installed in your system" +test_install "$PACKAGE" +echo "30" +echo "# Installing lliurex-sgbd...." +zero-installer install "$PACKAGE" + + + +if [ $? -ne 0 ]; then + zenity --info --text="$MSG_NOCONFIGURE" + zero-center remove-pulsating-color zero-jclic + exit 0 +fi + +#Testear el mysql +echo "40" +echo "# Testing 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 +echo "60" +echo "# Customing 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 +echo "80" +echo "# Executing last scripts......." +touch /etc/.jclic.conf +cat > /etc/.jclic.conf << EOF +********************************************* +Creado al configurar con zero-center el jclic +********************************************* +EOF +sleep 1 +) | zenity --progress --title="Jclic Report Server" --percentage=0 --auto-close --auto-kill --width="500" --no-cancel + + +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