summaryrefslogtreecommitdiffstats
path: root/admin/Interface/EjecutarScript
diff options
context:
space:
mode:
authoradv <adv@uma.es>2012-01-22 21:21:22 +0000
committeradv <adv@uma.es>2012-01-22 21:21:22 +0000
commite272d9e0daceefa365204435ca313dc6ade6c985 (patch)
treea6055177e2914d3b9337d21f7a0bb690cb3b2d29 /admin/Interface/EjecutarScript
parentfe08e1b92acaf0e92f081ac94add3cdf4e5b05aa (diff)
#477 internacionalización de creacion y restauracion -interface, scripts-
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2458 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/Interface/EjecutarScript')
-rwxr-xr-xadmin/Interface/EjecutarScript32
1 files changed, 21 insertions, 11 deletions
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