Files
news_link/run.sh

15 lines
339 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd /home/dsyoon/workspace/news_link
PORT="${PORT:-8021}"
if lsof -ti tcp:"${PORT}" >/dev/null 2>&1; then
echo "Stopping existing server on port ${PORT}..."
lsof -ti tcp:"${PORT}" | xargs -r kill -9
sleep 1
fi
nohup /home/dsyoon/workspace/miniconda3/envs/ncue/bin/python app.py > nohup.out &