fly-entrypoint.sh 177 B

123456789101112
  1. #!/bin/bash
  2. set -e
  3. if [[ ! -z "$SWAP" ]]; then
  4. fallocate -l $(($(stat -f -c "(%a*%s/10)*7" .))) _swapfile
  5. mkswap _swapfile
  6. swapon _swapfile
  7. fi
  8. free -hm
  9. df -h
  10. exec "$@"