ssh
This commit is contained in:
parent
b3ae76109e
commit
aaa73f75c8
2 changed files with 15 additions and 9 deletions
|
@ -7,11 +7,6 @@ KEY_ALGORITHM='ed25519'
|
||||||
KEY_DIRECTORY='.ssh'
|
KEY_DIRECTORY='.ssh'
|
||||||
KEY_PATH="${KEY_DIRECTORY}/id_${KEY_ALGORITHM}"
|
KEY_PATH="${KEY_DIRECTORY}/id_${KEY_ALGORITHM}"
|
||||||
KEY_PUBLIC='AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5'
|
KEY_PUBLIC='AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5'
|
||||||
PACKAGES=(
|
|
||||||
'openssh-client'
|
|
||||||
'rsync'
|
|
||||||
'tree'
|
|
||||||
)
|
|
||||||
SERVER="$(basename ${GITHUB_SERVER_URL})"
|
SERVER="$(basename ${GITHUB_SERVER_URL})"
|
||||||
TARGET='/usr/local/sbin'
|
TARGET='/usr/local/sbin'
|
||||||
|
|
||||||
|
@ -36,7 +31,3 @@ chmod '400' "${KEY_PATH}" \
|
||||||
echo "${SERVER} ssh-${KEY_ALGORITHM} ${KEY_PUBLIC}" \
|
echo "${SERVER} ssh-${KEY_ALGORITHM} ${KEY_PUBLIC}" \
|
||||||
> "${KEY_DIRECTORY}/known_hosts" \
|
> "${KEY_DIRECTORY}/known_hosts" \
|
||||||
|| exit
|
|| exit
|
||||||
|
|
||||||
# packages
|
|
||||||
apt-get install --yes "${PACKAGES[@]}" \
|
|
||||||
|| exit
|
|
||||||
|
|
15
cd.sh
15
cd.sh
|
@ -31,6 +31,8 @@ cd_main () {
|
||||||
cd_install_python
|
cd_install_python
|
||||||
# TODO move to Python
|
# TODO move to Python
|
||||||
cd_install_rsync
|
cd_install_rsync
|
||||||
|
# TODO move to Python
|
||||||
|
cd_install_ssh
|
||||||
cd_clean_packages_cache
|
cd_clean_packages_cache
|
||||||
cd_install_python_modules ${CD_PYTHON_MODULES}
|
cd_install_python_modules ${CD_PYTHON_MODULES}
|
||||||
cd_execute_python_module ${CD_PYTHON_MODULES}
|
cd_execute_python_module ${CD_PYTHON_MODULES}
|
||||||
|
@ -353,6 +355,13 @@ Dir::Etc::SourceParts \"\";
|
||||||
"CD_PROJECTS_GROUP" "CD_PROJECT_NAME" "CD_PROJECT_BRANCH"
|
"CD_PROJECTS_GROUP" "CD_PROJECT_NAME" "CD_PROJECT_BRANCH"
|
||||||
cd_split
|
cd_split
|
||||||
cd_echo "CD_PROJECTS_URL" "CD_PROJECT_URL"
|
cd_echo "CD_PROJECTS_URL" "CD_PROJECT_URL"
|
||||||
|
# TODO move to Python
|
||||||
|
case "${CD_PM}" in
|
||||||
|
"${CD_PM_APK}"|"${CD_PM_APT}") CD_PKG_SSH="openssh-client" ;;
|
||||||
|
"${CD_PM_DNF}") CD_PKG_SSH="openssh-clients" ;;
|
||||||
|
"${CD_PM_PACMAN}") CD_PKG_SSH="openssh" ;;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_set_packages_repositories () {
|
cd_set_packages_repositories () {
|
||||||
|
@ -512,6 +521,12 @@ cd_install_rsync () {
|
||||||
cd_install_package "${CD_PKG_RSYNC}"
|
cd_install_package "${CD_PKG_RSYNC}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# TODO move to Python
|
||||||
|
cd_install_ssh () {
|
||||||
|
cd_step "Install SSH"
|
||||||
|
cd_install_package "${CD_PKG_SSH}"
|
||||||
|
}
|
||||||
|
|
||||||
cd_clean_packages_cache () {
|
cd_clean_packages_cache () {
|
||||||
cd_step "Clean packages cache"
|
cd_step "Clean packages cache"
|
||||||
${CD_PM_CLEAN} || exit
|
${CD_PM_CLEAN} || exit
|
||||||
|
|
Loading…
Reference in a new issue