Files
DentalManagement09/stop-app.sh
T
GiteadandClaude Opus 5.5 d235845ea2 fix: rclone PC-to-PC sync — serve backups, chat-history, uploads via filters; save source before Sync Now
The WebDAV server was narrowed to serve only backups/ (to stop exposing
.env), but the receiver still pulls /backups, /chat-history and /uploads,
so every sync failed with "directory not found". Serve the app root
filtered with --include to just those three folders; everything else
(.env, source, config/key files) returns 404.

Sync Now now saves the typed source IP/port before pulling, since the
pull reads the saved config.

stop-app.sh also frees port 8080: kill -9 on the backend orphans the
rclone child, which then keeps the port with stale settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 21:47:46 -04:00

22 lines
824 B
Bash
Executable File

#!/bin/bash
# Kill processes by port (backend 5000, selenium 5002, patient extractor 5001, payment OCR 5003, frontend 3000/3001)
# Also kill the rclone WebDAV server the backend spawns (8080) — kill -9 on the backend orphans it,
# and a leftover one keeps the port so the next start serves with stale settings.
for PORT in 5000 5001 5002 5003 3000 3001 8080; do
PIDS=$(lsof -ti :$PORT 2>/dev/null)
if [ -n "$PIDS" ]; then
echo "Killing port $PORT (PID $PIDS)"
kill -9 $PIDS 2>/dev/null
fi
done
# Kill any remaining turbo / ts-node-dev / vite processes for this project
PROJECT="DentalManagement09"
pkill -9 -f "turbo.*$PROJECT" 2>/dev/null
pkill -9 -f "ts-node-dev.*$PROJECT" 2>/dev/null
pkill -9 -f "vite.*$PROJECT" 2>/dev/null
pkill -9 -f "agent.py" 2>/dev/null
echo "All Dental App processes stopped."