Skip to content

Instantly share code, notes, and snippets.

View favarete's full-sized avatar
🤓
Code-Oriented Problem Solver

Rodrigo Favarete favarete

🤓
Code-Oriented Problem Solver
View GitHub Profile
I am attesting that this GitHub handle favarete is linked to the Tezos account tz1WQGhuPcsACPuTwxYJ2RVCkXiHJiNh462j for tzprofiles
sig:edsigtqmwPNHjoMjuh2dNbUtdw4zpvD8L5SJWphzYBwvhcFWRFuwcGfFxeNnJKfp7WjS6BUZMJewQiF79SjFFprrUcpPvaMzTZT
#!/bin/bash
source /home/project/myenv/bin/activate
cd /home/project/server
PID=$(ps aux | grep 'uvicorn myapp:app' | grep -v grep | awk {'print $2'} | xargs)
if [ "$PID" != "" ]
then
kill -9 $PID
sleep 2
echo "" > nohup.out
echo "Restarting FastAPI server"