Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
unic_connect
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rinat K. Nugaev
unic_connect
Commits
54ff7c84
Commit
54ff7c84
authored
Jul 20, 2017
by
Rinat K. Nugaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addedd some comments
parent
74e94853
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
unic_connect.sh
+2
-2
No files found.
unic_connect.sh
View file @
54ff7c84
...
@@ -28,15 +28,15 @@ ssh-add
...
@@ -28,15 +28,15 @@ ssh-add
if
[
-z
"
$user
"
]
;
then
if
[
-z
"
$user
"
]
;
then
echo
"Username not defined in script, asking for username!"
echo
"Username not defined in script, asking for username!"
read
-p
"Enter your username like PertrovPP:"
user
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
)
statusssh
=
$(
ssh
-o
BatchMode
=
yes
-o
ConnectTimeout
=
5
-p
10022
$user
@tunnel01.rbtechnologies.ru
echo
ok 2>&1
)
if
[[
$statusssh
==
ok
]]
;
then
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
sed
-i
-e
'0,/user=""/s/user=""/user='
$user
'/'
$0
else
else
echo
"Username defined! Trying to connect..."
echo
"Username defined! Trying to connect..."
fi
fi
fi
fi
#Cheking username for ssh connection and if good then add it to script variables
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment