#!/bin/bash
# Keepalive untuk MiliDesigner_bot — restart kalau mati
if ! pgrep -f "mili_bot_polling.py" > /dev/null 2>&1; then
  cd /home/mantapman/.hermes/profiles/atun/workspace
  setsid nohup python3 mili_bot_polling.py >> mili_bot.log 2>&1 < /dev/null &
  echo "$(date '+%Y-%m-%d %H:%M:%S') Mili restart (keepalive)" >> mili_bot_restart.log
fi
