mirror of
https://github.com/ION606/static-site-hosting.git
synced 2026-05-14 22:16:54 +00:00
nohip fix
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
all: 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:
|
||||
kill -9 $(cat app.pid) || true
|
||||
rm -f app.pid
|
||||
@if [ -s app.pid ]; then \
|
||||
kill -9 $$(cat app.pid) && rm -f app.pid; \
|
||||
else \
|
||||
echo "No running process found."; \
|
||||
fi
|
||||
|
||||
restart: stop run
|
||||
|
||||
@@ -13,5 +16,4 @@ logs:
|
||||
tail -f output.log
|
||||
|
||||
clean: stop
|
||||
rm -f output.log
|
||||
|
||||
rm -f output.log app.pid
|
||||
|
||||
Reference in New Issue
Block a user