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
Line | |
---|
1 | #!/bin/bash |
---|
2 | TIME1=$SECONDS |
---|
3 | |
---|
4 | |
---|
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 |
---|
8 | |
---|
9 | # Clear temporary file used as log track by httpdlog |
---|
10 | # Limpia los ficheros temporales usados como log de seguimiento para httpdlog |
---|
11 | echo -n "" > $OGLOGSESSION; echo -n "" > $OGLOGCOMMAND |
---|
12 | |
---|
13 | # Registro de inicio de ejecución |
---|
14 | echo "$MSG_INTERFACE_START $0 $*" | tee -a $OGLOGSESSION $OGLOGFILE |
---|
15 | |
---|
16 | echo -e "\n Instrucciones a ejecutar: *****************************" >> $OGLOGFILE |
---|
17 | cat $1 >> $OGLOGFILE |
---|
18 | |
---|
19 | |
---|
20 | echo -e "\n Salida de las instrucciones: *****************************" >> $OGLOGFILE |
---|
21 | chmod +x $1 |
---|
22 | # Si mandamos la salida a OGLOGCOMMAND reescribimos lo que manda el comando. |
---|
23 | #$1 &>> $OGLOGCOMMAND |
---|
24 | $1 |
---|
25 | RETVAL=$? |
---|
26 | |
---|
27 | |
---|
28 | |
---|
29 | TIME=$[SECONDS-TIME1] |
---|
30 | if [ $RETVAL == 0 ] |
---|
31 | then |
---|
32 | echo "[100] Duracion de la operacion $[TIME/60]m $[TIME%60]s" | tee -a $OGLOGSESSION $OGLOGFILE |
---|
33 | else |
---|
34 | echo "ERROR no operacion no realizada" | tee -a $OGLOGSESSION $OGLOGFILE |
---|
35 | fi |
---|
36 | |
---|
37 | |
---|
38 | # Registro de fin de ejecución |
---|
39 | echo "$MSG_INTERFACE_END $RETVAL" | tee -a $OGLOGSESSION $OGLOGFILE |
---|
40 | |
---|
41 | |
---|
42 | |
---|
43 | exit $RETVAL |
---|
Note: See
TracBrowser
for help on using the repository browser.