primer commit

This commit is contained in:
2026-01-17 21:43:47 -06:00
commit c8450ed5a8
40 changed files with 11170 additions and 0 deletions

32
clean.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
# WhatsApp Gateway - Cleanup Script
# Limpia sesiones, logs y cache
echo "🧹 Limpiando datos de WhatsApp Gateway..."
# 1. Limpiar sesión de WhatsApp (QR y vinculación)
if [ -d "gateway/auth_info" ]; then
echo "🗑️ Eliminando datos de sesión (gateway/auth_info)..."
rm -rf gateway/auth_info/*
# Mantener el directorio pero vacío
touch gateway/auth_info/.keep
else
mkdir -p gateway/auth_info
fi
# 2. Limpiar logs
if [ -f "gateway/gateway.log" ]; then
echo "🗑️ Eliminando log principal..."
rm -f gateway/gateway.log
fi
# 3. Limpiar logs de PM2 (si existen)
if command -v pm2 &> /dev/null; then
echo "🗑️ Limpiando logs de PM2..."
pm2 flush > /dev/null 2>&1 || true
fi
echo "✅ Limpieza completada!"
echo "👉 Ahora puedes reiniciar los servicios:"
echo " cd gateway && npm run dev"