prebuild.sh 477 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. set -e
  3. VERSION=${VERSION:?"VERSION not set"}
  4. cd $(dirname $0)
  5. rm -rf ./build
  6. mkdir -p ./build
  7. cat > ./build/lsb-release << EOF
  8. DISTRIB_ID=${DISTRIB_ID}
  9. DISTRIB_RELEASE=${VERSION}
  10. DISTRIB_DESCRIPTION="${DISTRIB_ID} ${VERSION}"
  11. EOF
  12. cat > ./build/sshd_config.append.tpl << EOF
  13. {{- if .Port}}
  14. Port {{.Port}}
  15. {{- end}}
  16. {{- if .ListenAddress}}
  17. ListenAddress {{.ListenAddress}}
  18. {{- end}}
  19. ClientAliveInterval 180
  20. UseDNS no
  21. PermitRootLogin no
  22. AllowGroups docker
  23. EOF