infra/scripts/deploy/finish_preseeded_ubuntu.sh
2024-09-03 09:25:22 -04:00

25 lines
438 B
Bash
Executable File

#! /usr/bin/env bash
PROJECT_ROOT=$GOPATH/src/mlog
# 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"