github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/integration/ignores/restart.sh (about) 1 #!/bin/sh 2 # 3 # A helper script to restart a given process as part of a Live Update. 4 # 5 # Further reading: 6 # https://docs.tilt.dev/live_update_reference.html#restarting-your-process 7 # 8 # Usage: 9 # Copy start.sh and restart.sh to your container working dir. 10 # 11 # Make your container entrypoint: 12 # ./start.sh path-to-binary [args] 13 # 14 # To restart the container: 15 # ./restart.sh 16 17 set -u 18 19 touch restart.txt 20 PID="$(cat process.txt)" 21 if [ $? -ne 0 ]; then 22 echo "unable to read process.txt. was your process started with start.sh?" 23 exit 1 24 fi 25 kill "$PID"