Adding the ability to disable Jump support #1

Merged
mattburchett merged 2 commits from JumpBoolOption into master 2019-01-14 15:23:24 +00:00
3 changed files with 9 additions and 1 deletions
Showing only changes of commit 5407c7ad7d - Show all commits

View File

@ -3,6 +3,7 @@
"resolverPort": 53,
"domains": [ "kc.linuxrocker.com"],
"jumpHost": "jump01.kc.linuxrocker.com",
"useJump": false,
"splitString": ".linuxrocker",
"windowsGeometry": "1600x900"
}

View File

@ -13,6 +13,7 @@ type Config struct {
ResolverPort int `json:"resolverPort"`
Domains []string `json:"domains"`
JumpHost string `json:"jumpHost"`
UseJump bool `json:"useJump"`
SplitString string `json:"splitString"`
WindowsGeometry string `json:"windowsGeometry"`
}

View File

@ -13,6 +13,8 @@ func CreateShellAliases(data []string, username string, config config.Config) {
hostname := splitStrings[0]
txt := splitStrings[2]
useJump := config.UseJump
jump := config.JumpHost
stringSplit := config.SplitString
@ -61,6 +63,10 @@ func CreateShellAliases(data []string, username string, config config.Config) {
}
}
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)
}
}
}