source: admin/Interface/EjecutarScript @ bf001d0

Last change on this file since bf001d0 was 91aaf03, checked in by ramon <ramongomez@…>, 13 years ago

Versión 1.0.3, #499: Integrar versión 1.0.3 en rama principal.

git-svn-id: https://opengnsys.es/svn/trunk@2695 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 1.3 KB
RevLine 
[3ec149c]1#!/bin/bash
[71643c0]2TIME1=$SECONDS
[914d834]3
[71643c0]4
[91aaf03]5#Load engine configurator from engine.cfg file.
6#Carga el configurador del engine desde el fichero engine.cfg
7[ -z $OGENGINECONFIGURATE ] && source /opt/opengnsys/etc/engine.cfg
[71643c0]8
[91aaf03]9# Clear temporary file used as log track by httpdlog
10# Limpia los ficheros temporales usados como log de seguimiento para httpdlog
11echo " " > $OGLOGSESSION; echo " " > $OGLOGCOMMAND; echo " " > ${OGLOGCOMMAND}.tmp
[71643c0]12
[91aaf03]13# Registro de inicio de ejecución
14#echo "[START Interface ] Run this command: $0 $*" | tee -a $OGLOGSESSION $OGLOGFILE
15echo "$MSG_INTERFACE_START $0 $*" | tee -a $OGLOGSESSION $OGLOGFILE
[71643c0]16
17echo "Instrucciones a ejecutar: *****************************" >>  $OGLOGFILE
[914d834]18cat  $1 >> $OGLOGFILE
[71643c0]19
[91aaf03]20
[71643c0]21echo "Salida de las instrucciones: *****************************" >>  $OGLOGFILE
[914d834]22chmod +x $1
[71643c0]23$1 &>> $OGLOGCOMMAND
[ecd8d9a]24RETVAL=$?
[91aaf03]25
26
27
[71643c0]28TIME=$[SECONDS-TIME1]
[ecd8d9a]29if [ $RETVAL == 0 ]
30then
[71643c0]31        echo "[100] Duracion de la operacion $[TIME/60]m $[TIME%60]s" | tee -a $OGLOGSESSION $OGLOGFILE
[ecd8d9a]32else
[71643c0]33        echo "ERROR no operacion no realizada" | tee -a $OGLOGSESSION $OGLOGFILE
[ecd8d9a]34fi
[91aaf03]35
36
37# Registro de fin de ejecución
38#echo "[END Interface] Command finished with this code:  $RETVAL" | tee -a $OGLOGSESSION $OGLOGFILE
39echo "$MSG_INTERFACE_END $RETVAL" | tee -a $OGLOGSESSION $OGLOGFILE
40
41
42
[ecd8d9a]43exit $RETVAL
Note: See TracBrowser for help on using the repository browser.