mirror of
https://github.com/Threnklyn/ssh-config-manager.git
synced 2026-05-18 21:03:29 +02:00
setting to disable up/down check
This commit is contained in:
+15
-1
@@ -6,11 +6,14 @@
|
||||
|
||||
#================== Globals ==================================================
|
||||
# Version
|
||||
VERSION="0.2"
|
||||
VERSION="0.3"
|
||||
|
||||
# Configuration
|
||||
HOST_FILE="$HOME/.ssh/config"
|
||||
|
||||
# test connection
|
||||
TEST=1
|
||||
|
||||
#================== Functions ================================================
|
||||
|
||||
function exec_ping() {
|
||||
@@ -76,7 +79,9 @@ function main (){
|
||||
for a in $(get_name); do
|
||||
addr=$(get_addr $a)
|
||||
arr[$i]=$a
|
||||
if (($TEST)); then
|
||||
test_host $addr
|
||||
fi
|
||||
printf "%15s\t(%2s)\t%s\n" $a $i $addr
|
||||
i=$((i+1))
|
||||
done
|
||||
@@ -89,4 +94,13 @@ function main (){
|
||||
}
|
||||
|
||||
#=============================================================================
|
||||
# If there are params call original ssh
|
||||
if [ $# -gt 0 ]; then
|
||||
for i in $@;do
|
||||
params=" $params $i"
|
||||
done
|
||||
/usr/bin/ssh $params
|
||||
exit
|
||||
fi
|
||||
|
||||
main
|
||||
|
||||
Reference in New Issue
Block a user