dont attempt to configure a tilde if we are already using it
This commit is contained in:
parent
6db7d0d90b
commit
980c140169
6
setup.sh
6
setup.sh
|
@ -17,6 +17,12 @@ setup_tildelinux() {
|
||||||
echo "What is your username for $tilde_name?"
|
echo "What is your username for $tilde_name?"
|
||||||
read tilde_username
|
read tilde_username
|
||||||
|
|
||||||
|
if grep -q "$tilde_username@$tilde_name" /tilde/current_tilde
|
||||||
|
then
|
||||||
|
echo "You are already using $tilde_name as $tilde_username! Exiting..."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
if ! grep -q "$tilde_username@$tilde_name" /tilde/tildes
|
if ! grep -q "$tilde_username@$tilde_name" /tilde/tildes
|
||||||
then
|
then
|
||||||
echo "Now you will need to provide tildelinux with your ssh private key"
|
echo "Now you will need to provide tildelinux with your ssh private key"
|
||||||
|
|
2
user.sh
2
user.sh
|
@ -70,5 +70,7 @@ configure_user() {
|
||||||
sed -i "s|{{ TILDE_USERNAME }}|$tilde_username|g" "/tilde/tildes"
|
sed -i "s|{{ TILDE_USERNAME }}|$tilde_username|g" "/tilde/tildes"
|
||||||
sed -i "s|{{ KEY_FILE }}|$key_file|g" "/tilde/tildes"
|
sed -i "s|{{ KEY_FILE }}|$key_file|g" "/tilde/tildes"
|
||||||
|
|
||||||
|
echo "$tilde_username@$tilde_name" > /tilde/current_tilde
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue