2
0

shutdown.sh 273 B

1234567891011
  1. #!/usr/bin/with-contenv bash
  2. if [ -n "$AUTOSCALER_URL" ]; then
  3. # notify the sidecar of imminent shutdown
  4. PORT=${AUTOSCALER_SIDECAR_PORT:-6000}
  5. curl -d '{}' -v 0:$PORT/hook/v1/shutdown
  6. sleep 10
  7. fi
  8. # shutdown everything
  9. s6-svscanctl -t /var/run/s6/services