2024-03-25 11:53:37 +00:00
|
|
|
KEY_ALGORITHM='ed25519'
|
|
|
|
KEY_PATH=".ssh/id_ed25519"
|
|
|
|
KEY_PUBLIC='AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5'
|
|
|
|
PACKAGES=(
|
|
|
|
'python3'
|
|
|
|
'rsync'
|
|
|
|
'tree'
|
|
|
|
)
|
|
|
|
SERVER="$(basename ${GITHUB_SERVER_URL})"
|
|
|
|
|
2024-03-23 08:39:00 +00:00
|
|
|
# ssh
|
|
|
|
|
2024-03-25 11:53:37 +00:00
|
|
|
mkdir '.ssh' \
|
|
|
|
|| exit
|
2024-03-23 08:39:00 +00:00
|
|
|
|
2024-03-25 11:53:37 +00:00
|
|
|
echo "${CD}" > "${KEY_PATH}" \
|
|
|
|
|| exit
|
2024-03-22 23:59:39 +00:00
|
|
|
unset CD
|
2024-03-25 11:53:37 +00:00
|
|
|
chmod '400' "${KEY_PATH}" \
|
|
|
|
|| exit
|
2024-03-22 23:59:39 +00:00
|
|
|
|
2024-03-25 14:36:24 +00:00
|
|
|
echo "|1|BcccCTMLpM9HHSgJmPu/FFOwOv0=|+3BKK02xibpCPxQ9Nghi2GbXLng= \
|
|
|
|
ssh-${KEY_ALGORITHM} ${KEY_PUBLIC}" \
|
2024-03-25 11:53:37 +00:00
|
|
|
> '.ssh/known_hosts' \
|
|
|
|
|| exit
|
2024-03-23 08:52:09 +00:00
|
|
|
|
2024-03-23 11:10:20 +00:00
|
|
|
# packages
|
2024-03-23 08:52:09 +00:00
|
|
|
|
2024-03-25 11:53:37 +00:00
|
|
|
apt-get install --yes "${PACKAGES[@]}"
|