tl-setup/setup.sh

41 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
tilde_name=""
tilde_username=""
key_file=""
startx_command="startlxqt"
. ./util.sh
. ./connection.sh
. ./user.sh
choice=""
clear
echo "=== Welcome to Tildelinux! ==="
configure_network || fail
clear
echo "What tilde would you like to connect to? (use the domain name as you would for ssh)"
read tilde_name
echo "What is your username for $tilde_name?"
read tilde_username
echo "Now you will need to provide tildelinux with your ssh private key"
echo "By whatever means, place your private key in the /tilde/key directory"
echo "Here is a shell, once the key is in the proper location, simply type \"exit\" to close the shell and continue"
bash
echo "Looking for keyfile..."
check_key_file "$tilde_username" "$tilde_name" || fail
# the key_file variable has now been set by check_key_file
echo "Configuring user..."
configure_user "$key_file" "$tilde_username" "$tilde_name" "$startx_command" || fail
echo "User configured!"
echo "All done! Enjoy using Tildelinux!"
rm ./setup_incomplete
systemctl restart 'getty@tty1.service'