domovoy_bot/stop.sh
Admin ba4676b0af v1.0 MVP - Инициализация проекта 🏠
 Регистрация и верификация жильцов
 Рейтинг активности (уровни)
 Детект шпионов (Score 0-100)
 Анти-мат система (3 предупреждения → бан)
 Админ-панель с рассылкой
 Учёт квартир (несколько жильцов)
 Телефоны экстренных служб и мастеров
 Еженедельный экспорт JSON
 Прокси (socks5) для обхода РКН

Бекап: backups/versions/v1.0_mvp_2026-02-26/

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-27 10:54:16 +00:00

33 lines
1 KiB
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Скрипт остановки домового бота
cd /home/matrixhasyou/domovoy_bot
echo "🔍 Поиск процессов бота..."
EXISTING_PIDS=$(pgrep -f "python.*main.py")
if [ -n "$EXISTING_PIDS" ]; then
echo "✅ Найдены процессы:"
echo "$EXISTING_PIDS"
echo ""
echo "🛑 Останавливаем..."
pkill -f "python.*main.py"
sleep 2
# Проверяем что остановили
if pgrep -f "python.*main.py" > /dev/null; then
echo "⚠️ Процессы не остановились. Убиваем силой..."
pkill -9 -f "python.*main.py"
sleep 1
fi
if pgrep -f "python.*main.py" > /dev/null; then
echo "❌ Не удалось остановить процессы"
echo "Попробуйте вручную: kill -9 <PID>"
exit 1
else
echo "✅ Бот успешно остановлен"
fi
else
echo " Бот не запущен"
fi