tl-setup/setup.sh

66 lines
1.6 KiB
Bash
Raw Normal View History

2020-06-10 03:57:46 +00:00
#!/bin/sh
2020-06-13 04:03:09 +00:00
. ./util.sh
. ./basics.sh
. ./irc.sh
2020-06-10 03:57:46 +00:00
2020-06-14 20:39:55 +00:00
export tilde_name=""
export tilde_username=""
export key_file=""
2020-06-10 03:57:46 +00:00
#configure_tilde
#configure_irc
choice=""
2020-06-14 23:41:44 +00:00
clear
2020-06-10 03:57:46 +00:00
echo "=== Welcome to Tildelinux! ==="
2020-06-14 23:41:44 +00:00
configure_network || fail
2020-06-10 03:57:46 +00:00
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 || fail
echo "Key file located!"
echo "Testing connection to the tilde..."
connection_test || fail
echo "Connection success!"
echo "Configuring user..."
configure_user || fail
echo "User configured!"
clear
echo "=== IRC Configuration ==="
echo "Now we will begin configuring a WeeChat IRC relay"
echo "Select the option that applies to you:"
echo "1. I have a WeeChat relay configured on my chosen tilde"
echo "2. I do not have a WeeChat relay configured on my chosen tilde"
read -r choice
while :
do
case "$choice" in
"1")
clear
set_relay_config "existing"
2020-06-14 23:19:28 +00:00
break
2020-06-10 03:57:46 +00:00
;;
"2")
clear
echo "Since no WeeChat relay exists, a new one will be configured"
echo "First, provide a port number and password for this relay"
set_relay_config "new"
2020-06-14 23:19:28 +00:00
break
2020-06-10 03:57:46 +00:00
;;
"*")
echo "Please enter a valid option"
;;
esac
done
echo "All done! Enjoy using Tildelinux!"
2020-06-17 05:32:05 +00:00
rm ./setup_incomplete
2020-06-10 03:57:46 +00:00
#startx