File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ fnEstructuraRB()
2
+ {
3
+ msg "Buscando prev en backups para montar como .prev" "INFO"
4
+ #APWARBCK=$(ssh -q ${IPSRV} "find ${RTINST}/.bck/ -name '${APWAR}.prev.*'" | head -1)
5
+ APWARBCK=$(ssh -q ${IPSRV} "ls -ltr ${RTINST}/.bck/${APWAR}.prev.*| tail -1")
6
+
7
+ msg "Creando comando para borrado de componente actual" "INFO"
8
+ CMD1="rm -rf ${RTINST}/${APWAR}"
9
+
10
+ msg "Creando comando para mover prev como componente actual" "INFO"
11
+ CMD1="$CMD1;mv ${RTINST}/${APWAR}.prev ${RTINST}/${APWAR}"
12
+
13
+ if [ $(echo $APWARBCK | wc -l) -gt 0 ]
14
+ then
15
+ APWARBCK=$(echo $APWARBCK | awk '{print $9}')
16
+ msg "Creando comando para mover backup de prev como componente previo" "INFO"
17
+ CMD1="$CMD1;mv ${APWARBCK} ${RTINST}/${APWAR}.prev"
18
+ else
19
+ msg "No existe un prev en backup para ser montado como .prev, se omite la creación de comando" "WARN"
20
+ fi
21
+
22
+ msg "Ejecutando comandos de estructura:" "INFO"
23
+ msg "$CMD1" "DEBUG"
24
+ ssh -q ${IPSRV} "${CMD1}"
25
+ }
26
+
You can’t perform that action at this time.
0 commit comments