bootstrap/bootstrap-Windows.sh
Kenneth Benzie (Benie) 3606f4bbb9 Update Windows bootstrap scripts
* Add `bootstrap-Windows.ps1` sets up the bare minimum required to start
  Debian in WSL2 sharing SSH keys with the Windows host and enable SSH
  server for remote access.
* Add `bootstrap-Windows.sh` copies Windows host SSH keys, upgrades
  Debian to unstable, then installs Ansible and dependencies.
* Remove `bootstrap-Windows.cmd`.
2022-06-11 15:45:58 +01:00

28 lines
648 B
Bash
Executable File

#!/usr/bin/env bash
# Copy SSH keys from Windows host.
cp -r /mnt/c/Users/Benie/.ssh ~/.ssh
chown benie:benie ~/.ssh
for file in ~/.ssh/*; do
chmod 0600 $file
done
# Upgrade Debian to unstable
sudo apt-get update
sudo apt-get upgrade --yes
sudo sed 's/stretch/buster/g' -i /etc/apt/sources.list
sudo apt-get update
sudo apt-get full-upgrade --yes
sudo sed 's/buster/bullseye/g' -i /etc/apt/sources.list
sudo apt-get update
sudo apt-get full-upgrade --yes
sudo sed 's/bullseye/unstable/g' -i /etc/apt/sources.list
sudo apt-get update
sudo apt-get full-upgrade --yes
# Install ansible
sudo apt-get install ansible git python3-apt python3-pip