]> git.llucax.com Git - mecon/scripts.git/commitdiff
Quitamos localhost y agregamos bal747f a la lista de servidores a cargar.
authorMatías Sklar <msklar@mecon.gov.ar>
Wed, 11 Jun 2003 22:18:31 +0000 (22:18 +0000)
committerMatías Sklar <msklar@mecon.gov.ar>
Wed, 11 Jun 2003 22:18:31 +0000 (22:18 +0000)
novedades/cargas/bal747f.mecon.ar/carga [moved from novedades/cargas/localhost/carga with 95% similarity]
novedades/cargas/bal747f.mecon.ar/scripts/10.borrar.codep [new file with mode: 0755]
novedades/cargas/bal747f.mecon.ar/scripts/20.copiar.datos [new file with mode: 0755]
novedades/cargas/bal747f.mecon.ar/scripts/40.codep [new file with mode: 0755]
novedades/cargas/bal747f.mecon.ar/scripts/50.novedades [moved from novedades/cargas/localhost/scripts/50.novedades with 100% similarity]
novedades/cargas/bal747f.mecon.ar/scripts/60.copiar.codep [new file with mode: 0755]

similarity index 95%
rename from novedades/cargas/localhost/carga
rename to novedades/cargas/bal747f.mecon.ar/carga
index b88ee3a9f5e679d7828f22879c673da75332bb53..b42542fa8bae4c67fa07299f46bb65cc57ab4438 100755 (executable)
@@ -8,7 +8,7 @@
 # Configuración.
 home="$1"
 datos="$2"
-host="localhost"
+host="bal747f"
 user="intranet"
 pass="intranet"
 db="novedades"
diff --git a/novedades/cargas/bal747f.mecon.ar/scripts/10.borrar.codep b/novedades/cargas/bal747f.mecon.ar/scripts/10.borrar.codep
new file mode 100755 (executable)
index 0000000..772b034
--- /dev/null
@@ -0,0 +1,9 @@
+#!/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
new file mode 100755 (executable)
index 0000000..64d86e0
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+host="$1"
+user="$2"
+pass="$3"
+db="$4"
+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"/*
diff --git a/novedades/cargas/bal747f.mecon.ar/scripts/40.codep b/novedades/cargas/bal747f.mecon.ar/scripts/40.codep
new file mode 100755 (executable)
index 0000000..d7be87a
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+host="$1"
+user="$2"
+pass="$3"
+#db="$4"
+db="CODEP"
+home="$5"
+datos="$6"
+
+cat <<EOT | mysql -h"$host" -u"$user" -p"$pass" "$db"
+SELECT
+    codigo_actual, nombre_breve
+INTO OUTFILE
+    '$datos/codep'
+FIELDS TERMINATED BY
+    ','
+LINES TERMINATED BY
+    '\n'
+FROM
+    Dependencias;
+EOT
diff --git a/novedades/cargas/bal747f.mecon.ar/scripts/60.copiar.codep b/novedades/cargas/bal747f.mecon.ar/scripts/60.copiar.codep
new file mode 100755 (executable)
index 0000000..4150b8a
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+host="$1"
+user="$2"
+pass="$3"
+db="$4"
+home="$5"
+datos="$6"
+
+scp -1 -r novedades@"$host":"$datos"/codep "$datos"