diff options
Diffstat (limited to 'client/shared/scripts/remoteConsole')
-rwxr-xr-x | client/shared/scripts/remoteConsole | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/client/shared/scripts/remoteConsole b/client/shared/scripts/remoteConsole new file mode 100755 index 00000000..dc0fc4bb --- /dev/null +++ b/client/shared/scripts/remoteConsole @@ -0,0 +1,22 @@ +#!/bin/bash +# Script de ejemplo para enviar eco a la consola remota al ejecutar un comando de la shell +# Formato: remoteConsole + +PROG="$(basename $0)" +if [ $# -ne 0 ]; then + ogRaiseError $OG_ERR_FORMAT "$MSG_FORMAT: $PROG " + exit $? +fi + +# Directorio del servidor donde se exportan los ficheros de registro. +SERVERLOGDIR=$(mount | awk -v d=$OGLOG ' + BEGIN {FS="[: ]"} + {if ($4==d) dir=$2} + END {print dir}') + +# Fichero de listado: hard-IP +ECOFILE="eco-$(ogGetIpAddress)" +# Redirigir salida al fichero de listado. +/tmp/_hidrascript_ >$OGLOG/$ECOFILE || exit $? +# Salida: camino del fichero de listado en el servidor de repositorio. +echo $SERVERLOGDIR/$ECOFILE |