PID로 파이썬 서버 재시작
BEFORE_PID=$(cat sh.pid)
echo "before PID: $BEFORE_PID"
kill -9 $BEFORE_PID
git pull
nohup python setup.py runserver --host=0.0.0.0 &
echo $! > sh.pid
NEW_PID=$(cat sh.pid)
echo "NEW PID: $NEW_PID"
ps -ef | grep runserver
https://krksap.tistory.com/1576?category=658837