[Unit] Description=KIS Quant Backtest Web Dashboard After=network.target [Service] Type=simple User=hoon WorkingDirectory=/home/hoon/kis_bot # 시작 전 5050 포트 강제 해제 (재시작 시 포트 잔존 방지) ExecStartPre=/bin/sh -c 'fuser -k 5050/tcp 2>/dev/null; sleep 1; true' ExecStart=/home/hoon/kis_bot/.venv/bin/python /home/hoon/kis_bot/backtest_web.py Restart=on-failure RestartSec=5 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target