]> git.llucax.com Git - mecon/scripts.git/commitdiff
Se agrega tc2120, por ahora la parte del CODEP esta desactivada. master svn_import
authorLeandro Lucarella <llucax@gmail.com>
Mon, 24 May 2004 20:06:37 +0000 (20:06 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Mon, 24 May 2004 20:06:37 +0000 (20:06 +0000)
novedades/cargas/tc2120.mecon.ar/carga [new file with mode: 0755]
novedades/cargas/tc2120.mecon.ar/scripts/20-copiar-datos [new file with mode: 0755]
novedades/cargas/tc2120.mecon.ar/scripts/30-borrar-codep [new file with mode: 0755]
novedades/cargas/tc2120.mecon.ar/scripts/40-codep [new file with mode: 0755]
novedades/cargas/tc2120.mecon.ar/scripts/50-novedades [new file with mode: 0755]
novedades/cargas/tc2120.mecon.ar/scripts/60-copiar_codep [new file with mode: 0755]

diff --git a/novedades/cargas/tc2120.mecon.ar/carga b/novedades/cargas/tc2120.mecon.ar/carga
new file mode 100755 (executable)
index 0000000..2a76d77
--- /dev/null
@@ -0,0 +1,28 @@
+#!/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"
+root="$3"
+host="tc2120"
+user="novedades"
+pass="h29di974b"
+db="novedades"
+
+# Script.
+/bin/run-parts \
+    --lsbsysinit \
+    --verbose \
+    --arg="$host" \
+    --arg="$user" \
+    --arg="$pass" \
+    --arg="$db" \
+    --arg="$home" \
+    --arg="$datos" \
+    --arg="$root" \
+    "$home/scripts"
diff --git a/novedades/cargas/tc2120.mecon.ar/scripts/20-copiar-datos b/novedades/cargas/tc2120.mecon.ar/scripts/20-copiar-datos
new file mode 100755 (executable)
index 0000000..f6bb836
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+host="$1"
+user="$2"
+pass="$3"
+db="$4"
+home="$5"
+datos="$6"
+
+scp -r "$datos"/* novedades@"$host":"$datos"
+ssh -n novedades@"$host" chmod -v  775 "$datos"
+ssh -n novedades@"$host" chmod -vR 664 "$datos"/*
diff --git a/novedades/cargas/tc2120.mecon.ar/scripts/30-borrar-codep b/novedades/cargas/tc2120.mecon.ar/scripts/30-borrar-codep
new file mode 100755 (executable)
index 0000000..b5b5f70
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+host="$1"
+user="$2"
+pass="$3"
+db="$4"
+home="$5"
+datos="$6"
+
+#ssh -n novedades@"$host" rm -vf "$datos"/codep
diff --git a/novedades/cargas/tc2120.mecon.ar/scripts/40-codep b/novedades/cargas/tc2120.mecon.ar/scripts/40-codep
new file mode 100755 (executable)
index 0000000..9e15923
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+host="$1"
+user="$2"
+pass="$3"
+#db="$4"
+db="CODEP"
+home="$5"
+datos="$6"
+
+#cat <<EOT | ssh novedades@"$host" mysql -hlocalhost -u"$user" -p"$pass" "$db"
+#SELECT
+#    codigo_actual, nombre_breve
+#INTO OUTFILE
+#    '$datos/codep'
+#FIELDS TERMINATED BY
+#    ','
+#LINES TERMINATED BY
+#    '\n'
+#FROM
+#    Dependencias
+#WHERE
+#    dependencia_esta_activa = 1;
+#EOT
diff --git a/novedades/cargas/tc2120.mecon.ar/scripts/50-novedades b/novedades/cargas/tc2120.mecon.ar/scripts/50-novedades
new file mode 100755 (executable)
index 0000000..5d30bf3
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+host="$1"
+user="$2"
+pass="$3"
+db="$4"
+home="$5"
+datos="$6"
+root="$7"
+
+ssh novedades@"$host" "$root/run-sql-data-parts" localhost "$user" "$pass" "$db" "$datos"
diff --git a/novedades/cargas/tc2120.mecon.ar/scripts/60-copiar_codep b/novedades/cargas/tc2120.mecon.ar/scripts/60-copiar_codep
new file mode 100755 (executable)
index 0000000..b2fb76f
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+host="$1"
+user="$2"
+pass="$3"
+db="$4"
+home="$5"
+datos="$6"
+
+#scp -r novedades@"$host":"$datos"/codep "$datos"