infra/scripts/setup/finish_preseeded_ubuntu.sh
2024-09-03 10:32:02 -04:00

22 lines
406 B
Bash
Executable File

#! /usr/bin/env bash
# Function to display usage
usage() {
echo "Usage: $0 -n <host_name>"
exit 1
}
# Parse command-line arguments
while getopts "n:" opt; do
case $opt in
n) HOST_NAME="$OPTARG" ;;
*) usage ;;
esac
done
rsync -avP ~/infra/ubuntu/bootstrap-ubuntu.sh ${HOST_NAME}:~/
ssh ${HOST_NAME} "sudo /bin/bash ./bootstrap-ubuntu.sh"
ssh ${HOST_NAME} "rm ~/bootstrap-ubuntu.sh"