You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
950 B
41 lines
950 B
## These instruction are sent to ``dupd`` on target image (doodba)
|
|
|
|
set -ex
|
|
|
|
mkdir -p /root/.ssh
|
|
|
|
curl https://docker.0k.io/get/vm_git_access_id_rsa > /root/.ssh/id_rsa || {
|
|
echo "Fatal: Could not retrieve http://docker.0k.io/get/vm_git_access_id_rsa ..." >&2
|
|
exit 1
|
|
}
|
|
## Not so usefull as it is public !
|
|
chmod 0600 /root/.ssh/id_rsa
|
|
|
|
ssh-keyscan -p 10022 git.0k.io > /root/.ssh/known_hosts
|
|
chmod 600 /root/.ssh/known_hosts
|
|
|
|
cat <<EOF > /root/.ssh/config
|
|
|
|
Host git.0k.io
|
|
## We'll leverage persistent connection to speed things up
|
|
ControlMaster auto
|
|
ControlPath ~/.ssh/control/%r@%h:%p
|
|
ControlPersist 1m
|
|
ServerAliveInterval 20
|
|
HostKeyAlgorithms +ssh-dss
|
|
User vm-user
|
|
Port 10022
|
|
|
|
EOF
|
|
|
|
mkdir -p /root/.ssh/control
|
|
|
|
cat <<EOF > /opt/odoo/common/build.d/050-open-ssh
|
|
#!/bin/bash
|
|
|
|
echo "Checking and opening connection to git.0k.io:" >&2
|
|
ssh -v git.0k.io -- true
|
|
|
|
EOF
|
|
|
|
chmod +x /opt/odoo/common/build.d/050-open-ssh
|