sigs.k8s.io/cluster-api/bootstrap/kubeadm@v0.0.0-20191016155141-23a891785b60/third_party/forked/rerun-process-wrapper/restart.sh (about) 1 #!/bin/sh 2 # 3 # A helper script to implement restart_container when the docker runtime isn't available. 4 # 5 # Usage: 6 # Copy start.sh and restart.sh to your container working dir. 7 # 8 # Make your container entrypoint: 9 # ./start.sh path-to-binary [args] 10 # 11 # To restart the container: 12 # ./restart.sh 13 14 set -u 15 16 touch restart.txt 17 PID="$(cat process.txt)" 18 if [ $? -ne 0 ]; then 19 echo "unable to read process.txt. was your process started with start.sh?" 20 exit 1 21 fi 22 kill "$PID"