From: Matías Sklar Date: Wed, 23 Jul 2003 18:00:43 +0000 (+0000) Subject: Se arregla la carga de datos del codep. X-Git-Tag: svn_import~42 X-Git-Url: https://git.llucax.com/mecon/scripts.git/commitdiff_plain/4da15999131161e3ea4a1fe0be86bb88bd2adfae?ds=inline;hp=e674c6d94c6ed635f98ea8d6fc249a4ba29c90a6 Se arregla la carga de datos del codep. --- diff --git a/novedades/cargas/1.localhost/carga b/novedades/cargas/1.localhost/carga new file mode 100755 index 0000000..938b226 --- /dev/null +++ b/novedades/cargas/1.localhost/carga @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Script para cargar bases de datos. +# +# Creado por Leandro Lucarella (llucar) el mié ene 22 17:57:00 ART 2003 +# + +# Configuración. +home="$1" +datos="$2" +host="intranet-db.mecon.ar" +user="intranet" +pass="intranet" +db="CODEP" + +# Script. +/bin/run-parts \ + --lsbsysinit \ + --verbose \ + --arg="$host" \ + --arg="$user" \ + --arg="$pass" \ + --arg="$db" \ + --arg="$home" \ + --arg="$datos" \ + "$home/scripts" diff --git a/novedades/cargas/intranet2.mecon.ar/scripts/10-borrar-codep b/novedades/cargas/1.localhost/scripts/10-borrar-codep similarity index 61% rename from novedades/cargas/intranet2.mecon.ar/scripts/10-borrar-codep rename to novedades/cargas/1.localhost/scripts/10-borrar-codep index 027807b..affbf99 100755 --- a/novedades/cargas/intranet2.mecon.ar/scripts/10-borrar-codep +++ b/novedades/cargas/1.localhost/scripts/10-borrar-codep @@ -6,4 +6,4 @@ db="$4" home="$5" datos="$6" -ssh novedades@"$host" rm -vf "$datos"/codep +rm -vf "$datos"/codep diff --git a/novedades/cargas/intranet-db.mecon.ar/scripts/40-codep b/novedades/cargas/1.localhost/scripts/20-codep similarity index 79% rename from novedades/cargas/intranet-db.mecon.ar/scripts/40-codep rename to novedades/cargas/1.localhost/scripts/20-codep index d7be87a..eb44976 100755 --- a/novedades/cargas/intranet-db.mecon.ar/scripts/40-codep +++ b/novedades/cargas/1.localhost/scripts/20-codep @@ -2,8 +2,7 @@ host="$1" user="$2" pass="$3" -#db="$4" -db="CODEP" +db="$4" home="$5" datos="$6" @@ -17,5 +16,7 @@ FIELDS TERMINATED BY LINES TERMINATED BY '\n' FROM - Dependencias; + Dependencias +WHERE + dependencia_esta_activa = 1; EOT diff --git a/novedades/cargas/bal747f.mecon.ar/scripts/10-borrar-codep b/novedades/cargas/bal747f.mecon.ar/scripts/10-borrar-codep deleted file mode 100755 index 772b034..0000000 --- a/novedades/cargas/bal747f.mecon.ar/scripts/10-borrar-codep +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -host="$1" -user="$2" -pass="$3" -db="$4" -home="$5" -datos="$6" - -ssh -1 novedades@"$host" rm -vf "$datos"/codep diff --git a/novedades/cargas/bal747f.mecon.ar/scripts/20-copiar-datos b/novedades/cargas/bal747f.mecon.ar/scripts/20-copiar-datos index 64d86e0..3255b35 100755 --- a/novedades/cargas/bal747f.mecon.ar/scripts/20-copiar-datos +++ b/novedades/cargas/bal747f.mecon.ar/scripts/20-copiar-datos @@ -7,5 +7,5 @@ home="$5" datos="$6" scp -1 -vr "$datos"/* novedades@"$host":"$datos" -ssh -1 novedades@"$host" chmod -v 775 "$datos" -ssh -1 novedades@"$host" chmod -vR 664 "$datos"/* +ssh -1 -n novedades@"$host" chmod -v 775 "$datos" +ssh -1 -n novedades@"$host" chmod -vR 664 "$datos"/* diff --git a/novedades/cargas/bal747f.mecon.ar/scripts/40-codep b/novedades/cargas/bal747f.mecon.ar/scripts/40-codep deleted file mode 100755 index d7be87a..0000000 --- a/novedades/cargas/bal747f.mecon.ar/scripts/40-codep +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -host="$1" -user="$2" -pass="$3" -#db="$4" -db="CODEP" -home="$5" -datos="$6" - -cat <