stop.sh 279 B

1234567891011
  1. #!/bin/bash
  2. # 查找并杀死监听端口 8000 的进程
  3. PID=$(ps aux | grep 'manage.py runserver 0.0.0.0:8084' | grep -v grep | awk '{print $2}')
  4. if [ -z "$PID" ]; then
  5. echo "No process found running on port 8084."
  6. else
  7. kill -9 $PID
  8. echo "Process $PID killed."
  9. fi