source: admin/Sources/Services/ogAdmRepoAux @ 62d43c3

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 62d43c3 was 7f7068e, checked in by ramon <ramongomez@…>, 14 years ago

Versión 1.0.2: simplificar servicio ogAdmRepoAux.

git-svn-id: https://opengnsys.es/svn/branches/version1.0@2338 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 1.3 KB
Line 
1#!/bin/bash
2PARM=`cat`
3
4#TODO:  ticket 379
5#buscar parametro de identificador de operacion.
6#usar parametro de identificacion para anexarlo al nombre de log
7#Comprobar si la variable está seteas.
8#Si no lo está setearla.
9#Si esta seteada (en progreso) salir.
10
11
12
13BASEDIR=/opt/opengnsys
14PATH=$PATH:$BASEDIR/bin
15REPONAME=ogAdmRepo
16REPOLOG=$BASEDIR/log/$REPONAME.log
17MCASTLOGBASE=$BASEDIR/log/mcastlog
18MCASTLOG=$MCASTLOGBASE/ogAdmRepoMcast.`date +%Y%m%d-%H%M%S`
19
20# Añade registro de incidencias.
21function echolog () {
22        date +"%Y%m%d-%H%M%S $*" >> $REPOLOG
23}
24
25mkdir -p $MCASTLOGBASE
26
27PARM1=$(echo $PARM | cut -f1 -d" ")
28PARM2=$(echo $PARM | cut -f2 -d" ")
29PARM3=$(echo $PARM | cut -f3 -d" ")
30PARM4=$(echo $PARM | cut -f4 -d" ")
31
32
33case "$PARM1" in
34        START_MULTICAST)
35                #1 START_MULTICAST
36                #2 fichero a enviar
37                #3 opciones de multicast
38                FILE="$PARM2"
39                MCASTOPT="$PARM3"
40                echolog "Ejecutar $(which sendFileMcast) $FILE $MCASTOPT"
41                sendFileMcast $FILE $MCASTOPT &>> $MCASTLOG
42                case $? in
43                        1)  echolog "Parametros insuficientes"
44                            return 1 ;;
45                        2)  echolog "Fichero no accesible"
46                            return 2 ;;
47                        3)  echolog "Sesion multicast no valida"
48                            return 3 ;;
49                esac
50        ;;
51        default)
52            echolog "Solicitud con parametros  \"$PARM\"  no realizada, no registrada o con errores"
53        ;;
54esac
55
Note: See TracBrowser for help on using the repository browser.