source: jclic/trunk/fuentes/debian/patches/zero-center.patch @ 6544

Last change on this file since 6544 was 6544, checked in by Juanma, 3 years ago

Fix reportserver install on semi-light clients

File size: 5.6 KB
  • new file jclic.install-files/etc/lliurex-sgbd/jclic.sgbd

    Description: <short summary of the patch>
     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 <juanma1980@gmail.com>
    
    ---
    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: <vendor|upstream|other>, <url of original patch>
    Bug: <url in upstream bugtracker>
    Bug-Debian: https://bugs.debian.org/<bugnumber>
    Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
    Forwarded: <no|not-needed|url proving that it has been forwarded>
    Reviewed-By: <name and email of someone who approved the patch>
    Last-Update: <YYYY-MM-DD>
    
    - +  
     1######################################################################################
     2# file name app.sgbd
     3# DB_NAME name of your database
     4# DB_USER name of your database user
     5# MYSQL_DATA_FILE place where you leave your mysql file to be injected on database (optional)
     6# INCLUDE_PATH place where leave your database include file with slash (must exist path)
     7# BACKUP_PATH place where leave your database automatic backup with slash (must exist path)
     8# USE_TEMPLATE (YES or NO) create your own template following debconf format
     9# you can use "lliurex-sgbd --template" to generate this template
     10# Copy this file modified with your own parameters in your debian package directory
     11#
     12# The include generated file will be INCLUDE_PATH/debian-db.php
     13#
     14######################################################################################
     15#
     16#       SAMPLE
     17# file name pmb.sgbd
     18#
     19# DB_NAME               = pmb
     20# DB_USER               = pmb_user
     21# MYSQL_DATA_FILE       = /usr/share/pmb/www/lliurex/pmb4_base.sql
     22# INCLUDE_PATH          = /etc/pmb/
     23# BACKUP_PATH           = /etc/pmb/backup/
     24# USE_TEMPLATE          = YES
     25#
     26######################################################################################
     27
     28[parameters]
     29DB_NAME         = JClicReports
     30DB_USER         = jclic_user
     31DB_PASS         = jclic_pwd
     32MYSQL_DATA_FILE =
     33INCLUDE_PATH    = /etc/jclic/
     34BACKUP_PATH     = /etc/jclic/backup/
     35USE_TEMPLATE    = NO
  • new file zero-jclic.zlaunchers/zero-jclic.app

    - +  
     1Name=zero-jclic
     2Name[en]=zero-jclic
     3Name[es]=Configuracion del Jclic Reportserver
     4Name[qcv]=Configuraciò del Jclic Reportserver
     5Name[ca]=Configuraciò del Jclic Reportserver
     6Comment=Client Configuration of Jclic Reportserver
     7Comment[en]=Client Configuration of Jclic Reportserver
     8Comment[es]=Configuración del servidor de informes de Jclic
     9Comment[qcv]=Configuraciò del servidor de informes de Jclic
     10Comment[ca]=Configuraciò del servidor de informes de Jclic
     11Icon=jclic
     12Category=Software
     13ScriptPath=zero-jclic.zmd
     14Groups=adm;admins;teachers
     15Using=pe
     16Service=True
     17Modal=True
     18Locks=zero-jclic
  • new file zero-jclic.zlaunchers/zero-jclic.zmd

    - +  
     1#!/bin/bash
     2
     3export TEXTDOMAIN="zero-jclic"
     4export DEBIAN_FRONTEND="noninteractive"
     5MSG_ERROR_MYSQL=$(gettext "You must install and run mysql")
     6MSG_NOCONFIGURE=$(gettext "Leaving unconfigured")
     7MSG_PASSWD=$(gettext "Administrator password for Jclic Reports: /etc/lliurex-sgbd/jclic.sgbd")
     8
     9PACKAGE="lliurex-sgbd"
     10
     11
     12function test_install {
     13                #Testeamos si el paquete esta instalado, no haciendo nada en el caso afirmativo o instalandolo en el caso negativo.
     14                TEST=$( dpkg-query -s $1 2> /dev/null| grep Status | cut -d " " -f 4 )
     15                if [ "$TEST" = 'installed' ]; then
     16                        echo "Package $1 already installed, we have to uninstall it"
     17                        su -c "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.'" $USER
     18                        zero-installer remove $1
     19                fi
     20
     21        }
     22
     23
     24
     25##############################MAIN###########################
     26
     27zero-center add-pulsating-color zero-jclic
     28
     29(
     30echo "# Updating Repositories...."
     31zero-repos-update
     32echo "20"
     33echo "Testing if package was installed in your system"
     34test_install "$PACKAGE"
     35echo "30"
     36echo "# Installing lliurex-sgbd...."
     37zero-installer install "$PACKAGE"
     38
     39
     40
     41if [ $? -ne 0 ]; then
     42        zenity --info --text="$MSG_NOCONFIGURE"
     43        zero-center remove-pulsating-color zero-jclic
     44        exit 0
     45fi
     46
     47#Testear el mysql
     48echo "40"
     49echo "# Testing mysql...."
     50RESULT=$(mysql_root_passwd -a)
     51if [ "$RESULT" = "NO" ]; then
     52        zenity --error --text "$MSG_ERROR_MYSQL"
     53        zero-center remove-pulsating-color zero-jclic
     54        exit 0
     55fi
     56
     57#Inicializar mysql
     58echo "60"
     59echo "# Customing mysql....."
     60mysql_root_passwd -i
     61
     62#Crear la base de datos y el usuario, si no existe
     63resp=$(lliurex-sgbd --db_is_present jclic )
     64if [ "$resp" = "NO" ] ; then
     65        lliurex-sgbd --install jclic
     66else
     67        lliurex-sgbd --upgrade jclic
     68fi
     69
     70#Crear un fichero de inicialización
     71echo "80"
     72echo "# Executing last scripts......."
     73touch /etc/.jclic.conf
     74cat > /etc/.jclic.conf << EOF
     75*********************************************
     76Creado al configurar con zero-center el jclic
     77*********************************************
     78EOF
     79sleep 1
     80) | zenity --progress --title="Jclic Report Server" --percentage=0 --auto-close --auto-kill --width="500" --no-cancel
     81
     82
     83zenity --warning --text="$MSG_PASSWD" &
     84
     85#Deshabilitar después de configurar
     86zero-center remove-pulsating-color zero-jclic
     87zero-center set-configured zero-jclic
     88
     89exit 0
Note: See TracBrowser for help on using the repository browser.