added verbosity, enabled a cleanup command

This commit is contained in:
sose 2020-06-14 23:24:08 +00:00
parent 621066005c
commit a696575da2
2 changed files with 6 additions and 2 deletions

View File

@ -27,6 +27,7 @@ configure_user() {
mkdir "/home/$tilde_username"
useradd "$tilde_username" -d "/home/$tilde_username"
chown "$tilde_username:$tilde_username" "/home/$tilde_username"
echo "Mounting sshfs filesystem...
sshfs "$tilde_username@$tilde_name":"/home/$tilde_username" "/home/$tilde_username" -o ssh_command="ssh -i $key_file"
# touch /usr/bin/sshshell
# echo "#!/bin/sh" >> /usr/bin/sshshell

7
irc.sh
View File

@ -59,17 +59,20 @@ set_relay_config(){
echo "port = $weechat_relay_port" > ./.qweechat.conf
echo "server = $tilde_name" > ./.qweechat.conf
echo "Copying qWeeChat config..."
scp -i "$key_file" ./.qweechat.conf "$tilde_username@$tilde_name:./"
if [ "$relay_type" = "new" ]
then
temp_file_name=".$(shuf -i 0-100000 -n 1).temp"
echo "Since you do not have an existing WeeChat relay, a new one will be configured for you"
echo "Configuring WeeChat on remote host..."
echo "weechat_relay_port=\"$weechat_relay_port\" weechat_relay_password=\"$weechat_relay_password\" $(cat ./util.sh ./configure_weechat_session.sh)" > $temp_file_name
echo "Copying setup scripts to remote host..."
scp -i "$key_file" "$temp_file_name" "$tilde_username@$tilde_name:./"
ssh_command="$ssh_command -t -t"
echo "Running setup scripts..."
$ssh_command "sh $temp_file_name"
#$ssh_command "rm ./$temp_file_name"
$ssh_command "rm ./$temp_file_name"
rm "$temp_file_name"
fi
}