Command exited with code 0. Command output: root 244 0.0 0.0 29436 1036 ? Ss Nov03 0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers root 666 0.0 3.1 979072 326844 ? Rsl Nov03 809:29 /root/MayaXSenderbot/venv/bin/python3 bridge.py root 34269 0.0 0.0 4332 3072 pts/4 Ss+ 05:44 0:00 bash -c ps aux | grep -E "python|bridge" ; cat start.sh ; echo "--- stop.sh ---" ; cat stop.sh ; echo "--- log_cleanup.sh ---" ; cat log_cleanup.sh root 34271 0.0 0.0 3536 1752 pts/4 S+ 05:44 0:00 grep -E python|bridge #!/bin/bash # ── start.sh (PM2 Powered) ────────────────────────────────────────────── DIR="$(cd "$(dirname "$0")" && pwd)" PYTHON="$DIR/venv/bin/python3" SCRIPT="bridge.py" if [ ! -f "$PYTHON" ]; then echo "[ERROR] venv not found. Run: bash setup.sh first." exit 1 fi # Kill old screen session if left over screen -S sam_bridge -X quit 2>/dev/null || true echo "[START] Launching Auto Sender ($SCRIPT) in PM2..." cd "$DIR" pm2 start "$PYTHON" --name auto-sender --max-memory-restart 500M --restart-delay 3000 -- "$SCRIPT" pm2 save echo "[OK] Auto Sender is RUNNING in PM2 and will auto-start after VPS reboots!" echo "" echo " Live logs : pm2 logs auto-sender" echo " Status : pm2 status auto-sender" echo " Stop : bash stop.sh" --- stop.sh --- #!/bin/bash # ── stop.sh ─────────────────────────────────────────────────────────────── screen -S sam_bridge -X quit 2>/dev/null || true if pm2 list | grep -q "auto-sender"; then pm2 stop auto-sender echo "[STOP] Auto Sender stopped." else echo "[STOP] Auto Sender was not running." fi --- log_cleanup.sh --- #!/bin/bash # ── Auto Maintenance & Cleanup Script ── DIR="/root/MayaXSenderbot" # 1. Keep only last 7 days of PM2 logs find /root/.pm2/logs/ -name "*.log" -mtime +7 -delete 2>/dev/null find /root/.pm2/logs/ -name "*.gz" -mtime +7 -delete 2>/dev/null # 2. Rotate bridge.log if > 50MB if [ -f "$DIR/bridge.log" ]; then SIZE_MB=$(du -m "$DIR/bridge.log" | cut -f1) if [ "$SIZE_MB" -gt 50 ]; then mv "$DIR/bridge.log" "$DIR/bridge.log.$(date +%Y%m%d_%H%M)" gzip "$DIR/bridge.log.$(date +%Y%m%d_%H%M)" 2>/dev/null touch "$DIR/bridge.log" chmod 600 "$DIR/bridge.log" fi find "$DIR" -name "bridge.log.*.gz" -mtime +7 -delete 2>/dev/null fi # 3. Clean backups older than 14 days find /root/MayaXSenderbot_backups/ -maxdepth 1 -name "MayaXSenderbot_backup_*" -mtime +14 -exec rm -rf {} + 2>/dev/null find "$DIR" -maxdepth 1 -name "*.bak_*" -mtime +7 -delete 2>/dev/null # 4. Clean temporary files find /tmp -name "tmp.*" -mtime +2 -delete 2>/dev/null # 5. Save PM2 state pm2 save >/dev/null 2>&1 || true