Commit 54ff7c84 by Rinat K. Nugaev

Addedd some comments

parent 74e94853
......@@ -28,15 +28,15 @@ ssh-add
if [ -z "$user" ] ; then
echo "Username not defined in script, asking for username!"
read -p "Enter your username like PertrovPP:" user
#Cheking username for ssh connection and if good then add it to script variables
statusssh=$(ssh -o BatchMode=yes -o ConnectTimeout=5 -p 10022 $user@tunnel01.rbtechnologies.ru echo ok 2>&1)
if [[ $statusssh == ok ]] ; then
echo "Adding username $user for future use in script"
echo "Adding username $user for future use in the script"
sed -i -e '0,/user=""/s/user=""/user='$user'/' $0
else
echo "Username defined! Trying to connect..."
fi
fi
#Cheking username for ssh connection and if good then add it to script variables
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment