Compare commits
No commits in common. "6cde24300528b5b2f8163ff177d8bea505a51fda" and "003deb6455edfcc3d19640422f9ad474ce3e2041" have entirely different histories.
6cde243005
...
003deb6455
2 changed files with 24 additions and 44 deletions
|
@ -1,28 +1,20 @@
|
||||||
KEY_ALGORITHM='ed25519'
|
|
||||||
KEY_PATH=".ssh/id_ed25519"
|
|
||||||
KEY_PUBLIC='AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5'
|
|
||||||
PACKAGES=(
|
|
||||||
'python3'
|
|
||||||
'rsync'
|
|
||||||
'tree'
|
|
||||||
)
|
|
||||||
SERVER="$(basename ${GITHUB_SERVER_URL})"
|
|
||||||
|
|
||||||
# ssh
|
# ssh
|
||||||
|
|
||||||
mkdir '.ssh' \
|
mkdir --parents ~/.ssh
|
||||||
|| exit
|
|
||||||
|
|
||||||
echo "${CD}" > "${KEY_PATH}" \
|
echo "${CD}" > ~/.ssh/id_ed25519
|
||||||
|| exit
|
|
||||||
unset CD
|
unset CD
|
||||||
chmod '400' "${KEY_PATH}" \
|
chmod 400 ~/.ssh/id_ed25519
|
||||||
|| exit
|
|
||||||
|
|
||||||
echo "${SERVER} ssh-${KEY_ALGORITHM} ${KEY_PUBLIC}" \
|
echo -n "\
|
||||||
> '.ssh/known_hosts' \
|
|1|BcccCTMLpM9HHSgJmPu/FFOwOv0=|+3BKK02xibpCPxQ9Nghi2GbXLng= \
|
||||||
|| exit
|
ssh-ed25519 \
|
||||||
|
AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5
|
||||||
|
" > ~/.ssh/known_hosts
|
||||||
|
|
||||||
# packages
|
# packages
|
||||||
|
|
||||||
apt-get install --yes "${PACKAGES[@]}"
|
apt-get install --yes \
|
||||||
|
'python3' \
|
||||||
|
'rsync' \
|
||||||
|
'tree' \
|
||||||
|
|
36
cd.sh
36
cd.sh
|
@ -1,27 +1,15 @@
|
||||||
NAMESERVERS=(
|
echo "\
|
||||||
'9.9.9.9'
|
nameserver 9.9.9.9
|
||||||
)
|
" > '/etc/resolv.conf' \
|
||||||
PACKAGES=(
|
&& \
|
||||||
'git'
|
|
||||||
)
|
|
||||||
REPOSITORY='rwx.work/cd'
|
|
||||||
TARGET='/usr/local/sbin'
|
|
||||||
|
|
||||||
for nameserver in "${NAMESERVERS[@]}" ; do
|
|
||||||
echo "nameserver ${nameserver}" \
|
|
||||||
>> '/etc/resolv.conf' \
|
|
||||||
|| exit
|
|
||||||
done
|
|
||||||
|
|
||||||
apt-get update \
|
apt-get update \
|
||||||
|| exit
|
&& \
|
||||||
|
apt-get install \
|
||||||
apt-get install --yes "${PACKAGES[@]}" \
|
'git' \
|
||||||
|| exit
|
--yes \
|
||||||
|
&& \
|
||||||
git clone \
|
git clone \
|
||||||
"${GITHUB_SERVER_URL}/${REPOSITORY}" \
|
"${GITHUB_SERVER_URL}/rwx.work/cd" \
|
||||||
"${TARGET}" \
|
'/usr/local/sbin' \
|
||||||
|| exit
|
&& \
|
||||||
|
|
||||||
cd-bootstrap.sh
|
cd-bootstrap.sh
|
||||||
|
|
Loading…
Reference in a new issue