Adding the ability to disable Jump support
This commit is contained in:
parent
d6b5d7c2ed
commit
5407c7ad7d
@ -3,6 +3,7 @@
|
|||||||
"resolverPort": 53,
|
"resolverPort": 53,
|
||||||
"domains": [ "kc.linuxrocker.com"],
|
"domains": [ "kc.linuxrocker.com"],
|
||||||
"jumpHost": "jump01.kc.linuxrocker.com",
|
"jumpHost": "jump01.kc.linuxrocker.com",
|
||||||
|
"useJump": false,
|
||||||
"splitString": ".linuxrocker",
|
"splitString": ".linuxrocker",
|
||||||
"windowsGeometry": "1600x900"
|
"windowsGeometry": "1600x900"
|
||||||
}
|
}
|
@ -13,6 +13,7 @@ type Config struct {
|
|||||||
ResolverPort int `json:"resolverPort"`
|
ResolverPort int `json:"resolverPort"`
|
||||||
Domains []string `json:"domains"`
|
Domains []string `json:"domains"`
|
||||||
JumpHost string `json:"jumpHost"`
|
JumpHost string `json:"jumpHost"`
|
||||||
|
UseJump bool `json:"useJump"`
|
||||||
SplitString string `json:"splitString"`
|
SplitString string `json:"splitString"`
|
||||||
WindowsGeometry string `json:"windowsGeometry"`
|
WindowsGeometry string `json:"windowsGeometry"`
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,8 @@ func CreateShellAliases(data []string, username string, config config.Config) {
|
|||||||
hostname := splitStrings[0]
|
hostname := splitStrings[0]
|
||||||
txt := splitStrings[2]
|
txt := splitStrings[2]
|
||||||
|
|
||||||
|
useJump := config.UseJump
|
||||||
|
|
||||||
jump := config.JumpHost
|
jump := config.JumpHost
|
||||||
stringSplit := config.SplitString
|
stringSplit := config.SplitString
|
||||||
|
|
||||||
@ -61,6 +63,10 @@ func CreateShellAliases(data []string, username string, config config.Config) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("alias %v=\\'%v%v%v %v@%v \"%v %v %v %v %v\"'\n", host, message, prerac, hop, username, jump, rac, racOpts, remoteUser, fqdn, sudo)
|
if useJump {
|
||||||
|
fmt.Printf("alias %v=\\'%v%v%v %v@%v \"%v %v %v %v %v\"'\n", host, message, prerac, hop, username, jump, rac, racOpts, remoteUser, fqdn, sudo)
|
||||||
|
} else {
|
||||||
|
fmt.Printf("alias %v=\\'%v %v %v %v %v %v\n", host, message, rac, racOpts, remoteUser, fqdn, sudo)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user