This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -- DEFINICIÓN VARIABLES DE FECHA Y HORA. | |
DIA=`date +"%Y%m%d"` | |
HORA=`date +"%H%M"` | |
# -- CONFIGURACIÓN DE VARIABLES GLOBALES | |
DUMP_HOME="." | |
DUMP_FILE="dump_"$DIA"_"$HORA".sql" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Author: www.tormentadebits.com | |
# | |
# /etc/init.d/glassfish | |
# | |
### BEGIN INIT INFO | |
# Provides: glassfish | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 3 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# tomcat start/stop script | |
# Usage: tomcat6 [ start | stop | enable | disable | restart | status ] | |
# | |
set -a | |
# Definitions | |
# Paths to tomcat files, and a label | |
TOMCAT_HOME="/opt/apache-tomcat-6.0.35" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Realiza una copia de seguridad completa de la herramienta. | |
# DEFINICION DE CONSTANTES. | |
# ========================= | |
DIA=`date +"%Y%m%d"` | |
HORA=`date +"%H%M"` | |
# VARIABLES DE CONFIGURACION. | |
# =========================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Procedimiento de sincronizacion de repositorios previa verificacion de existencia de carpeta. | |
if [ -d /opt/opensuse/12.3/repo/update/ ]; then | |
rsync --times --perms --recursive --links --verbose --progress mirrors.nl.eu.kernel.org::opensuse/update/12.3/ /opt/opensuse/12.3/repo/update/ --delete-after --human-readable --itemize-changes --stats --exclude=x86_64 | |
fi | |
if [ -d /opt/opensuse/12.3/repo/oss/ ]; then | |
rsync --times --perms --recursive --links --verbose --progress mirrors.nl.eu.kernel.org::opensuse/distribution/12.3/repo/oss/ /opt/opensuse/12.3/repo/oss/ --delete-after --human-readable --itemize-changes --stats --exclude=x86_64 | |
fi | |
if [ -d /opt/opensuse/12.3/repo/non-oss/ ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Obteniendo el mes en letras | |
MES=`date +"%B"` | |
# Detectando fin de mes y mostrando en pantalla. | |
TOMORROW=`date --date=tomorrow +%d` | |
if [ $TOMORROW -eq "1" ]; then | |
echo "ALERTA: Hoy es el último día de $MES!" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIA=`date +"%d/%m/%Y"` | |
HORA=`date +"%H:%M"` | |
echo "Hoy es el $DIA y la hora actual es $HORA!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Variables | |
# OBS VARIABLE FILES_LIFE_TIME: Cuando el valor es 1, los archivos a | |
# ser eliminados son los que tienen una antiguedad mayor a 48 horas, | |
# si el valor de la variable es 2, los archivos que seran eliminados | |
# seran aquellos con una antiguedad mayor a 72 horas, y si por ejemplo | |
# el valor de la variable es cero 0, los archivos eliminados seran | |
# aquellos cuya antiguedad sea mayor a 24 horas en existencia. | |
PATH_ARCHIVES_LOCAL=/backups | |
FILES_LIFE_TIME=2 |
NewerOlder