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
RevLine 
[8fc9552]1#!/bin/bash
2PARM=`cat`
3
[e8460d2]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
[aa91bf5]13BASEDIR=/opt/opengnsys
[7f7068e]14PATH=$PATH:$BASEDIR/bin
[aa91bf5]15REPONAME=ogAdmRepo
16REPOLOG=$BASEDIR/log/$REPONAME.log
[e8460d2]17MCASTLOGBASE=$BASEDIR/log/mcastlog
18MCASTLOG=$MCASTLOGBASE/ogAdmRepoMcast.`date +%Y%m%d-%H%M%S`
[aa91bf5]19
[7f7068e]20# Añade registro de incidencias.
21function echolog () {
22        date +"%Y%m%d-%H%M%S $*" >> $REPOLOG
23}
24
[e8460d2]25mkdir -p $MCASTLOGBASE
[8fc9552]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
[7f7068e]33case "$PARM1" in
[8fc9552]34        START_MULTICAST)
[aa91bf5]35                #1 START_MULTICAST
36                #2 fichero a enviar
37                #3 opciones de multicast
[7f7068e]38                FILE="$PARM2"
39                MCASTOPT="$PARM3"
40                echolog "Ejecutar $(which sendFileMcast) $FILE $MCASTOPT"
41                sendFileMcast $FILE $MCASTOPT &>> $MCASTLOG
[e8460d2]42                case $? in
[7f7068e]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 ;;
[e8460d2]49                esac
[35a3e22]50        ;;
51        default)
[7f7068e]52            echolog "Solicitud con parametros  \"$PARM\"  no realizada, no registrada o con errores"
[8fc9552]53        ;;
[7f7068e]54esac
55
Note: See TracBrowser for help on using the repository browser.