nohip fix

This commit is contained in:
2025-02-16 16:47:49 -05:00
parent 4bfed64061
commit 5ec9ef9dd8
2 changed files with 7 additions and 5 deletions
+7 -5
View File
@@ -1,11 +1,14 @@
all: run all: run
run: run:
nohup .venv/bin/python app.py > output.log 2>&1 & echo $! > app.pid nohup python app.py > output.log 2>&1 & echo $$! > app.pid
stop: stop:
kill -9 $(cat app.pid) || true @if [ -s app.pid ]; then \
rm -f app.pid kill -9 $$(cat app.pid) && rm -f app.pid; \
else \
echo "No running process found."; \
fi
restart: stop run restart: stop run
@@ -13,5 +16,4 @@ logs:
tail -f output.log tail -f output.log
clean: stop clean: stop
rm -f output.log rm -f output.log app.pid
View File