feature: Gets Ubuntu autoinstall working.

This commit is contained in:
greysoh 2024-08-02 08:13:51 -04:00
parent eb1dc99389
commit 61ccbf61d6
23 changed files with 357 additions and 523 deletions

29
serverinfra/shell Executable file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env bash
if [ ! -f "conifg/.env" ]; then
echo "# NOTE: The UUID should be automatically generated, when running nix-shell. However, if it isn't, then" > .env
echo "# run uuidgen and change the below value." >> .env
cat config/.env.example >> config/.env
# Apple moment
sed "s/K3S_TOKEN=\"shared.secret.here\"/K3S_TOKEN=\"$(uuidgen)\"/g" config/.env > config/.env.2
mv config/.env.2 config/.env
echo "INFO: Before running any installation scripts, you should look over the contents of the file '.env',"
echo "and modify the contents as needed."
echo
fi
echo "Installation usage:"
echo " - ./install.sh \$IP:"
echo " Installs Ubuntu Server on \$IP. You will find the correct password in Help > Help on SSH access"
echo
echo "Have fun!"
set -a
source config/.env
set +a
bash
EXIT_CODE=$?
exit $EXIT_CODE