From e272d9e0daceefa365204435ca313dc6ade6c985 Mon Sep 17 00:00:00 2001 From: adv Date: Sun, 22 Jan 2012 21:21:22 +0000 Subject: #477 internacionalización de creacion y restauracion -interface, scripts- MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://opengnsys.es/svn/branches/version1.0@2458 a21b9725-9963-47de-94b9-378ad31fedc9 --- admin/Interface/EjecutarScript | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'admin/Interface/EjecutarScript') diff --git a/admin/Interface/EjecutarScript b/admin/Interface/EjecutarScript index 431164b9..1295885c 100755 --- a/admin/Interface/EjecutarScript +++ b/admin/Interface/EjecutarScript @@ -1,27 +1,30 @@ #!/bin/bash TIME1=$SECONDS -OGLOGSESSION="${OGLOGSESSION=:-/tmp/session.log}" -OGLOGCOMMAND="${OGLOGCOMMAND=:-/tmp/command.log}" -OGLOGSESSION="/tmp/session.log" -OGLOGCOMMAND="/tmp/command.log" +#Load engine configurator from engine.cfg file. +#Carga el configurador del engine desde el fichero engine.cfg +[ -z $OGENGINECONFIGURATE ] && source /opt/opengnsys/etc/engine.cfg -echo " " > $OGLOGSESSION -echo " " > $OGLOGCOMMAND -echo " " > ${OGLOGCOMMAND}.tmp +# Clear temporary file used as log track by httpdlog +# Limpia los ficheros temporales usados como log de seguimiento para httpdlog +echo " " > $OGLOGSESSION; echo " " > $OGLOGCOMMAND; echo " " > ${OGLOGCOMMAND}.tmp - -echo "START JOBS ***************************** " | tee -a $OGLOGSESSION $OGLOGFILE +# Registro de inicio de ejecución +#echo "[START Interface ] Run this command: $0 $*" | tee -a $OGLOGSESSION $OGLOGFILE +echo "$MSG_INTERFACE_START $0 $*" | tee -a $OGLOGSESSION $OGLOGFILE echo "Instrucciones a ejecutar: *****************************" >> $OGLOGFILE cat $1 >> $OGLOGFILE + echo "Salida de las instrucciones: *****************************" >> $OGLOGFILE chmod +x $1 $1 &>> $OGLOGCOMMAND RETVAL=$? -echo $RETVAL &>> $OGLOGFILE + + + TIME=$[SECONDS-TIME1] if [ $RETVAL == 0 ] then @@ -29,5 +32,12 @@ then else echo "ERROR no operacion no realizada" | tee -a $OGLOGSESSION $OGLOGFILE fi -echo "END JOBS ***************************** " | tee -a $OGLOGSESSION $OGLOGFILE + + +# Registro de fin de ejecución +#echo "[END Interface] Command finished with this code: $RETVAL" | tee -a $OGLOGSESSION $OGLOGFILE +echo "$MSG_INTERFACE_END $RETVAL" | tee -a $OGLOGSESSION $OGLOGFILE + + + exit $RETVAL \ No newline at end of file -- cgit v1.2.3-18-g5258