source: admin/Sources/Services/ogAdmServerAux @ 22813ed

configure-oglivelgromero-new-oglivemainmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineoglive-ipv6test-python-scriptsticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change on this file since 22813ed was c28eefa, checked in by Natalia Serrano <natalia.serrano@…>, 19 months ago

Log to syslog in a number of shell scripts

  • Property mode set to 100755
File size: 1004 bytes
Line 
1#!/bin/bash
2# Script para solicitar acciones al servidor de administración desde los clientes.
3# Acciones permitidas: configurar modo de arranque.
4PARM=`cat`
5
6
7
8BASEDIR=/opt/opengnsys
9PATH=$PATH:$BASEDIR/bin
10SERVERNAME=ogAdmServer
11SERVERLOG=$BASEDIR/log/$SERVERNAME.log
12
13
14# Añade registro de incidencias.
15function echolog () {
16        logger --tag $0 --priority local0.info "$*"
17        echo "$*"
18}
19
20
21PARM1=$(echo $PARM | cut -f1 -d" ")
22PARM2=$(echo $PARM | cut -f2 -d" ")
23PARM3=$(echo $PARM | cut -f3 -d" ")
24PARM4=$(echo $PARM | cut -f4 -d" ")
25
26
27case "$PARM1" in
28        SET_CLIENTMODE)
29                #1 SET_CLIENTMODE
30                #2  template
31                #3 pc_name o group_pc
32#4 modo temporal o permanente
33
34                TEMPLATE="$PARM2"
35                PC="$PARM3"
36#incluyo parametro de MODO
37                MODO="$PARM4"
38                echolog "Ejecutar $(which setclientmode) $FILE $MCASTOPT"
39#incluyo parametro de MODO
40                setclientmode $TEMPLATE $PC $MODO &>> $SERVERLOG
41                exit $?
42        ;;
43        default)
44            echolog "Solicitud con parametros  \"$PARM\"  no realizada, no registrada o con errores"
45        ;;
46esac
47
Note: See TracBrowser for help on using the repository browser.