1
0
mirror of https://github.com/rancher/os.git synced 2025-08-01 15:08:47 +00:00
os/images/02-console/prebuild.sh
2019-02-05 15:52:23 +08:00

32 lines
477 B
Bash
Executable File

#!/bin/bash
set -e
VERSION=${VERSION:?"VERSION not set"}
cd $(dirname $0)
rm -rf ./build
mkdir -p ./build
cat > ./build/lsb-release << EOF
DISTRIB_ID=${DISTRIB_ID}
DISTRIB_RELEASE=${VERSION}
DISTRIB_DESCRIPTION="${DISTRIB_ID} ${VERSION}"
EOF
cat > ./build/sshd_config.append.tpl << EOF
{{- if .Port}}
Port {{.Port}}
{{- end}}
{{- if .ListenAddress}}
ListenAddress {{.ListenAddress}}
{{- end}}
ClientAliveInterval 180
UseDNS no
PermitRootLogin no
AllowGroups docker
EOF