Renombrar FlotillasGPS a ADAN en todo el proyecto

This commit is contained in:
FlotillasGPS Developer
2026-01-21 08:26:01 +00:00
parent 51d78bacf4
commit 6d24ad6f61
37 changed files with 350 additions and 345 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# ============================================
# Sistema de Flotillas - Script de Backup
# Sistema de ADAN - Script de Backup
# ============================================
# Realiza backup de base de datos y configuracion
#
@@ -27,8 +27,8 @@ NC='\033[0m'
# ---------------------------------------------
# Variables de Configuracion
# ---------------------------------------------
INSTALL_DIR="${INSTALL_DIR:-/opt/flotillas}"
BACKUP_DIR="${BACKUP_DIR:-/var/backups/flotillas}"
INSTALL_DIR="${INSTALL_DIR:-/opt/adan}"
BACKUP_DIR="${BACKUP_DIR:-/var/backups/adan}"
RETENTION_DAYS="${BACKUP_RETENTION_DAYS:-7}"
# Cargar variables de entorno
@@ -39,8 +39,8 @@ fi
# Base de datos
DB_HOST="${POSTGRES_HOST:-localhost}"
DB_PORT="${POSTGRES_PORT:-5432}"
DB_NAME="${POSTGRES_DB:-flotillas}"
DB_USER="${POSTGRES_USER:-flotillas}"
DB_NAME="${POSTGRES_DB:-adan}"
DB_USER="${POSTGRES_USER:-adan}"
DB_PASSWORD="${POSTGRES_PASSWORD:-}"
# S3 (opcional)
@@ -50,7 +50,7 @@ S3_ENDPOINT="${S3_ENDPOINT:-https://s3.amazonaws.com}"
# Timestamp para este backup
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
BACKUP_NAME="flotillas_${TIMESTAMP}"
BACKUP_NAME="adan_${TIMESTAMP}"
# Flags
FULL_BACKUP=false
@@ -228,8 +228,8 @@ backup_config() {
"$INSTALL_DIR/deploy"
"/opt/traccar/conf/traccar.xml"
"/opt/mediamtx/mediamtx.yml"
"/etc/mosquitto/conf.d/flotillas.conf"
"/etc/systemd/system/flotillas-*.service"
"/etc/mosquitto/conf.d/adan.conf"
"/etc/systemd/system/adan-*.service"
"/etc/systemd/system/mediamtx.service"
)
@@ -290,7 +290,7 @@ rotate_backups() {
while IFS= read -r -d '' file; do
rm -f "$file"
((deleted++))
done < <(find "$BACKUP_DIR/daily" -type f -name "flotillas_*.gz" -mtime +${RETENTION_DAYS} -print0 2>/dev/null)
done < <(find "$BACKUP_DIR/daily" -type f -name "adan_*.gz" -mtime +${RETENTION_DAYS} -print0 2>/dev/null)
if [[ $deleted -gt 0 ]]; then
log_info "Eliminados $deleted backups antiguos"
@@ -356,7 +356,7 @@ create_backup_index() {
# Cabecera
cat > "$index_file" <<EOF
# Indice de Backups - Sistema de Flotillas
# Indice de Backups - Sistema de ADAN
# Generado: $(date)
# Retencion: ${RETENTION_DAYS} dias
#
@@ -426,7 +426,7 @@ send_notification() {
curl -s -X POST \
"https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
-d chat_id="${TELEGRAM_CHAT_ID}" \
-d text="${emoji} Backup Flotillas: ${message}" \
-d text="${emoji} Backup ADAN: ${message}" \
> /dev/null 2>&1
fi
}