1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
#!/bin/ksh esp="\\n " opcion=0 FECHA=`date +%d/%m/%Y` trap "continue" 2 3 ruta=/usr0/home/operators/servers salida=/usr/home/solit/servers/salida until test $opcion = 99 do clear date '+%n Fecha : %d/%m/%Y Hora : %H:%M Hrs.' echo " +---------------------------------------------+ | M E N U S E R V I D O R | +---------------------------------------------+ | 11-05-2016 V.1 servidor.sh | | | | | | [ 1] ... Sube proceso CARVOL01 | | | | [ 2] ... Sube proceso SIMPAD55 | | | | [ 3] ... | | | | [ 4] ... | | | | | +---------------------------------------------+ | [ENTER] ... Abandona el programa | +---------------------------------------------+ Su opcion es .... : \\c " read opcion if [ ! "$opcion" ] then break fi SERVIDOR=servidor USUARIO=operator PASSWORD=147.operators case $opcion in 1) echo "----------- Subiendo Proceso CARVOL01 en servidor SERVIDOR ----------------" echo "" echo " <<< EN PROCESO >>> (6 segundos aprox.)" echo "" (sleep 1;echo $USUARIO; sleep 1; echo $PASSWORD; sleep 1; echo "/sist/shell/./sube_carvol01.sh"; sleep 2; echo "ps -fea | grep CARVOL01 | grep -v grep"; sleep 1; echo "exit"; sleep 1) | telnet $SERVIDOR > $salida 2>/dev/null cat $salida | sed -n '/^ps -fea/,/^servidor/p' echo "---------------------------- FIN SUBIDA --------------------------------" read pausa echo "";; 2) echo "----------- Subiendo Proceso SIMPAD55 en servidor SERVIDOR ----------------" echo "" echo " <<< EN PROCESO >>> (6 segundos aprox.)" echo "" (sleep 1;echo $USUARIO; sleep 1; echo $PASSWORD; sleep 1; echo "/usr22/home/SHELL/./start_SIMPAD55.sh"; sleep 2; echo "ps -fea | grep SETMAIL01 | grep -v grep"; sleep 1; echo "exit"; sleep 1) | telnet $SERVIDOR > $salida 2>/dev/null cat $salida | sed -n '/^ps -fea/,/^servidor/p' echo "---------------------------- FIN SUBIDA --------------------------------" read pausa echo "";; *) echo " Opcion Incorrecta !! ** INTENTE DE NUEVO ** " sleep 1;; esac done clear echo "" echo "" echo "" echo "$esp **** F I N D E L P R O G R A M A ****" echo "" echo "" echo "" |